how do i add recoil to ranged items?

Started by Jromo2 on

Topic category: Help with Minecraft modding (Java Edition)

Joined Oct 2018
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
how do i add recoil to ranged items?

How do you add recoil to ranged items when used? I just want the player to be sent in the opposite direction that he's facing. I made an item in my other mod that sends you in the direction the player is facing but I do not know how to make it in the opposite direction.

Joined Oct 2018
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Yes but i do not know how to…
Wed, 02/03/2021 - 08:20

Yes but i do not know how to make it relative to the players pitch and yaw. I only know how to set the players velocity to a specific x y or z. I want to make it push you the opposite way you're looking.

Joined Mar 2020
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
well than do negative values
Sun, 01/02/2022 - 05:50

well than do negative values