Make an entity point towards another entity (in my case, player)

Started by guardtown4 on Thu, 06/30/2022 - 03:37

Topic category: Help with modding (Java Edition)

Last seen on 23:06, 26. Jul 2022
Joined Jul 2021
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • Tracker tickets:
  • MCreator plugins:
  • Comments:
Make an entity point towards another entity (in my case, player)
Thu, 06/30/2022 - 03:42 (edited)

I'm making a mod with a custom mob that's like a skeleton, but I made it so it shoots arrows with the procedure called every tick shown here: https://imgur.com/dGpRsWu

However, the entity's movement is a little erratic and it often shoots an arrow to the left or right of the player. I want to make it so my entity always points towards the player. I know there's a set rotation block, but I'm not sure how to get the yaw and pitch that would be towards the player.

 

Edited by guardtown4 on Thu, 06/30/2022 - 03:42