How to add bonus reach to a weapon.

Started by KangoMPK on Mon, 06/13/2022 - 17:01

Topic category: Help with modding (Java Edition)

Last seen on 07:12, 14. Jun 2022
Joined Jun 2022
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • Tracker tickets:
  • MCreator plugins:
  • Comments:
How to add bonus reach to a weapon.
Mon, 06/13/2022 - 17:01

I'm making a weapons mod for a small modpack. A javelin is a ranged weapon that can also do melee damage.

Is there any way to increase the reach of the melee damage(For example if you can only hit a zombie from 2 blocks away, with a javelin you can damage a zombie from 3 blocks away). please help

Last seen on 08:32, 8. Aug 2022
Joined Jun 2022
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • Tracker tickets:
  • MCreator plugins:
  • Comments:
Not sure if it works or not…
Tue, 06/14/2022 - 10:58

Not sure if it works or not but can you do something like
1. Check main hand = Javelin
2. Player attacks = Damage entity ( 3 ) blocks in front of player

Last seen on 23:20, 11. Aug 2022
Joined Feb 2022
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • Tracker tickets:
  • MCreator plugins:
  • Comments:
use /attribute command with…
Tue, 06/14/2022 - 15:54

use /attribute command with the run command as player procedure block.