Trying to figure out if an entity is looking in the direction that the player is, Backstab damage for example.

Started by KuroAkita2 on

Topic category: Help with modding (Java Edition)

Last seen on 19:33, 15. Dec 2020
Joined Nov 2020
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Trying to figure out if an entity is looking in the direction that the player is, Backstab damage for example.

At first I thought of getting the yaw and making the minimum -60 and maximum +60, giving a 120 degree window, But of course That wont work with the reset point that minecraft has between -160 and +160 (or whatever it was).

Last seen on 19:33, 15. Dec 2020
Joined Nov 2020
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Anyone have any idea how i…
Tue, 12/01/2020 - 21:38

Anyone have any idea how i might go about this?

Last seen on 14:43, 2. Aug 2022
Joined Nov 2018
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
If get entity yaw =…
Fri, 12/04/2020 - 16:56

If get entity yaw = sourceentity yaw

deal 4 damage to entity