How do i make swing main hand deal damage?

Started by GalaxyGaming2000 on Sat, 12/31/2022 - 07:22

Topic category: Help with modding (Java Edition)

Last seen on 06:50, 8. Mar 2023
Joined Dec 2022
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • Tracker tickets:
  • MCreator plugins:
  • Comments:
How do i make swing main hand deal damage?
Sat, 12/31/2022 - 07:22

So basically I'm trying to make a weapon that autoswings but the swing main hand of target/event entity doesn't deal damage

how do i make it act like a normal sword hit

Last seen on 18:56, 23. Mar 2023
Joined May 2022
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • Tracker tickets:
  • MCreator plugins:
  • Comments:
If the player is looking at…
Mon, 01/02/2023 - 17:23

If the player is looking at an entity when it does this, (if the look angle vector targets that entity), when the swing occurs, then execute a procedure that deals damage to that entity.