How I can to make knockback from my weapon?

Started by rainbow_horse on

Topic category: Help with Minecraft modding (Java Edition)

Joined Mar 2023
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
How I can to make knockback from my weapon?

Hello everyone. Not so long ago I begin making my mod what will be add guns in minecraft. I dealt with many aspects,but I dont now how I can to make a knockback after shooting.I mean that the players crosshair goes up a bit.With out it automate becomes a cheating weapon.So i need your help guys.If anyone knows how to do this, pls write. Thanks in advance))))

Joined Dec 2020
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
You can set the players…
Fri, 03/10/2023 - 10:43

You can set the players pitch to itself + a certain amount.

 

Set rotation of [Event/target entity] yaw: (Direction (yaw) in deg. relative to S of [Event/target entity]) pitch: (Head pitch of [Event/target entity] in degrees) + 10) 

 

Hope this helps!