How do I make a weapon deal knockback on right click?

Started by FlourToast on Sat, 07/23/2022 - 11:47

Topic category: Help with modding (Java Edition)

Last seen on 19:23, 19. Aug 2022
Joined Jul 2021
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • Tracker tickets:
  • MCreator plugins:
  • Comments:
How do I make a weapon deal knockback on right click?
Sat, 07/23/2022 - 11:47

I'm trying to make a mod where you can right click on an entity with a baseball bat to hit it backwards (like the knockback enchantment). How would I do this? Thanks in advance.