0

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?​

3
  • How are people killing it? Are they hitting it until it dies, are they in creative, or are they using a command?
    – SirBenet
    Nov 14, 2015 at 22:41
  • They are in survival and they are hitting it
    – Woulfiee
    Nov 14, 2015 at 22:43
  • What kind of entity are you trying to make unkillable?
    – Jason_
    Feb 17, 2016 at 8:27

1 Answer 1

2

Use the Invulnerable tag. Spawn the Entity with the extra tag {Invulnerable:1}.

Another choice is the resistance potion effect:

/effect <Target> minecraft:resistance 1000000 255 true

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .