How to make a bow which deals more damage?

Started by BlackCatGamer64 on

Topic category: Help with modding (Java Edition)

Last seen on 10:04, 17. May 2024
Joined Sep 2022
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
How to make a bow which deals more damage?

I want to make a bow which shoots regular arrows, but deals more damage than a normal bow. I have already got the bow shooting arrows (same as vanilla), but I'm having trouble changing the damage.

Basically, the arrow entity has a 'damage' tag which I want to modify, but only for the arrow shot by this bow. I have tried using global triggers to detect when the bow is shot, then increasing the damage of any nearby arrows (whether or not they were shot by this bow), but it fails to detect the arrows most of the time.

My current procedure: https://imgur.com/a/1LcRHcF

The main problem I have with this procedure is that it could modify the damage of other arrows, not shot by this bow.

 

Is there a way to detect if an arrow has just been shot?

Or, is there a way to get the shooter of a given projectile?

If the answer involves Java code, then I'm OK using snippets of it just for this purpose. I already had to use Java to make the bow.