despawning entities when looked at

Started by DARKPRO_XGM on

Topic category: Help with Minecraft modding (Java Edition)

Joined Nov 2023
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
despawning entities when looked at

i want to despawn a specific entity if a player looks at its direction for 3 seconds but every procedure i built havent worked yet, and i dont know how to code in java so can somebody please explain how i can do this?

Joined Oct 2023
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
You might have to do…
Wed, 11/29/2023 - 12:13

You might have to do something like checking if the look direction of the player faces the cords that the entity is on. You could also try ray tracing.