Problem with removing arrows from the player

Started by XGEM on

Topic category: Help with MCreator software

Last seen on 18:59, 6. Jul 2024
Joined Jul 2024
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Problem with removing arrows from the player
Fri, 07/05/2024 - 01:48 (edited)

Guys, I've been struggling with this for a couple of days now, I'm a newbie in MCreator, tried writing the code manually, don't know where I went wrong, so I decided to switch to visual programming - MCreator, to improve my programming logic at the same time.

This is my first post in this community, I hope I can get some help here.

I'm trying to implement a mod to extract arrows from oneself. Currently:
I made a variable, +1 for damage of the type - arrow, and -1 on button press.

_Problem at this stage -
There are conditional arrows in the player, but how to remove them from the player, is there a way to remove them one by one, or all at once? (obviously better one by one)
(And just to clarify, the visualization of arrow entities on the player)


Possible ideas and reasoning:
It seemed to me this could be done through counting the arrow entities on the player, but I don't know how to implement this, and most importantly, how to make this fabled extraction of arrows - to make the arrow disappear.

_Problem at this stage -
Is there a variable — the number of arrows in the player, or entities in the player (type), can it be created - interaction with the entity of arrows on the player itself.

Uncategorized questions:
Is it possible to implement the destruction of arrow entities at a distance from the player, and can they be destroyed one at a time?
(As a last resort, I'll go through checking for damage.)

(I'll make the arrows disappear by decreasing the number of ticks, I think I can come up with something, haven't started implementing it yet, yes it's a workaround, but if I can't find a way to assign a value to the variable to the number of arrows on the player, I'll have to use it, but it's really hacky)


P.S. I'm writing through a translator, I hope I've explained everything clearly, if something is unclear just write, I'll find a way to explain.
I would appreciate a link to a guide on ENB arrows, or any guide that could help me.
I hope I haven't forgotten anything, didn't ask anything stupid, and explained myself clearly, Godspeed.

Edited by XGEM on Fri, 07/05/2024 - 01:48