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

Started by FlourToast on

Topic category: Help with Minecraft modding (Java Edition)

Joined Jul 2021
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
How do I make a weapon deal knockback on right click?

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.