Make GeckoLib Entity look at player

Started by ChromaKira on

Topic category: Help with Minecraft modding (Java Edition)

Joined Oct 2023
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Make GeckoLib Entity look at player

I want to make an entity rotate its head towards player like vanilla entities do. How do I do that with the plugin?

Do I need to name the head bone "head" or something?

Thanks

Joined May 2022
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
You don't need a plugin, you…
Tue, 10/17/2023 - 18:22

You don't need a plugin, you can use the 'make entity look at (entity)' AI function in the entity's AI to do this. Your entity will rotate towards the nearest player, and, if it has a component in the model defined as 'head,' it'll rotate this component to face the player as well.