I want to protect my custom entity but everyone can kill it. I tried to loop setting health to max, I tried to protect it with events but it could still die.
How to protect it? Or is there any built-in-minecraft method which makes the entity unkillable?
Best Answer
Use the Invulnerable tag. Spawn the Entity with the extra tag
{Invulnerable:1}
.Another choice is the resistance potion effect: