How to add bonus reach to a weapon.

Started by KangoMPK on

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:
  • MCreator plugins:
  • Comments:
How to add bonus reach to a weapon.

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 06:13, 28. Aug 2023
Joined Jun 2022
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • 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 13:56, 19. Dec 2022
Joined Feb 2022
Points:

User statistics:

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

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