1

So lets say I'm making a map in Minecraft. No mods, no bukkit, no anything; just command blocks. and I have this one mob that I don't want players to be able to kill.

Normally, I would simply give it a resistance potion so that it couldn't be hurt, but I want other mobs to be able to hurt it, just not players.

Is it possible to make this mob unkillable by players, but still able to die by other mobs?

1
  • 1
    What kind of mob do you have here? Knowing how you're implementing the "other mobs damage" thing would be helpful to know. Do you have villagers being attacked by zombies? If so, there's probably a way to do this. I'm thinking something like this to apply damage (or increment a damage score and kill them when it hits a certain number) could work. – Unionhawk Nov 24 '14 at 20:57
1

/summon ExampleMob ~ ~ ~ {Invulnerable:1}

1

You could give the player a really strong weakness status effect if they're within melee range of the mob. This isn't exactly what you're looking for, since the player won't be able to kill any mobs within that region, even ones that they normally would elsewhere. If you're fine with that, then go right ahead.

If you also want it to be immune to player-shot arrows you could add

execute at @e[tag=enemy] run kill @e[type=arrow,distance=..2,nbt={pickup:1b}]

This only affects arrows shot by someone in survival or adventure mode, and not in creative. It also ignores arrows from entities like skeletons or pillagers.

-2

I'm sorry to tell you that unkillable mobs isn't possible without mods, even with mods they have a health bar, i dont think i've ever seen an unkillable mob, unless someone simply makes a "no health bar for mobs"

5
  • Unfortunately this is simply wrong. Command blocks can be used to make mobs invincible, by using Resistance 5 and such. – hedgehog1029 Dec 9 '14 at 19:42
  • ^^^ not true I've killed a mob with resistance 5 it takes a while but it is possible, also i have maxed out a zombie with everything and it was still killed after i did this, me and my friends open a LAN server to test it out – unknowne9867 Dec 9 '14 at 20:35
  • You can use a command to heal the mob when it gets hurt. It shouldn't be possible to kill a resistance X zombie though. – hedgehog1029 Dec 9 '14 at 20:48
  • well i guess but like that's still not invincible it's healing it when its health is low but yeah that would work, even though its not invincible it's the closest you can get. – unknowne9867 Dec 10 '14 at 22:46
  • You still have a fundamental misunderstanding on how Minecraft works. You could make a mob with high health and resistance X. MCEdit and other NBT editors let you do this. – hedgehog1029 Jan 7 '15 at 10:59

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.