Topic category: Help with Minecraft modding (Java Edition)
Hello,
I am making an entity that generates particles around it, until a player gets close, and it stops generating them, even if the player goes away. I was able to make it do this behavior through an NBT Tag, but I ran into a problem : when the player dies or leaves/rejoin, the entity starts creating the particles again, while he should still be not generating them. I tried using a global procedure instead to see if it would fix the problem, but it makes all of the entities of the same type stop generating particles, even if those specific ones have not been approached yet.
I would like to know if it is possible to make a variable that would not reset, and only affect specific entities of the same kind (those who have been approached by the player, but not those not approached yet)