How would I make an entity disappear(despawn) when the player looks at it?

Started by Electroman on

Topic category: Help with Minecraft modding (Java Edition)

Joined May 2023
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
How would I make an entity disappear(despawn) when the player looks at it?

For context, I have been developing a mod that has an entity similar to the man from the fog, I have made a separate entity from the aggressive version that spawns on occasion in a certain time period, I want to make it to where if I look at the entity(stalker form) he despawns and if you don't, he despawns and spawns his aggressive form. How would I be able to do this?

Joined Jun 2024
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
idk about the look part, all…
Wed, 07/10/2024 - 10:44

idk about the look part, all i know is that there is a despawn block from my look at the forum topics.