Minecraft – Making mobs invincible

minecraft-java-edition

Is there a way to make mobs invincible? I have already spent a while looking for it on google, but all I get is people telling me to give it a resistance potion effect. I am sure there is some attribute that I can give a summoned mob to make it invincible, but I don't know how to do it. How can I do this?

Best Answer

For simply making mobs invincible, this method is now outdated, see David Toh's solution using the new "Invulnerable" tag.


You need to use a resistance effect of level 5 or higher. This is the closest to a simple invincible tag we have at the moment, it gives the mob 100% resistance to damage, so is effectively the same thing. To summon a mob with an effect, you use the tags

{ActiveEffects:[{Id: x ,Amplifier: x ,Durat­ion: x }]}

So for an invincible skeleton, you would say:

/summon Skeleton ~ ~2 ~ {ActiveEffects:[{Id:11,Amplifier:5,Durat­ion:10000000}]}

The only way to kill this mob will then be either through mods, or using void damage (falling out of the world).

Extra Note: The mob may still de-spawn if it's not in a loaded area, to avoid this you can name your mob:

/summon Skeleton ~ ~2 ~ {CustomName:Example Name,CustomNameVisible:1,ActiveEffects:[{Id:11,Amplifier:5,Durat­ion:10000000}]}

Replace "Example Name" with a name of your choice.

In answer to the comment about using multiple effects:

You can have as many effects as you like by formatting your active effects section of the summon like so:

ActiveEffects:[{Id:11,Amplifier:5,Durat­ion:10000000},{‌​Id:14,Amplifier:1,Durati­on:10000000}]

Full command for invincible and invisible skeleton named "Example Name"

/summon Skeleton ~ ~2 ~ {CustomName:Example Name,CustomNameVisible:1,ActiveEffects:[{Id:11,Amplifier:5,Durat­ion:10000000},{‌​Id:14,Amplifier:1,Durati­on:10000000}]}