Guide to make your pets invincible!
This should work on both 1.13 and 1.14, and is not limited to ātamableā mobs, either. So even if you have a pet squid or slime this will work on them!
If youāre playing singleplayer: start by going into the escape menu and clickingĀ āOpen to LANā. Once you are in there, enable cheats, and then press open. Once that is done, run the command seen below via copy/paste.
If youāre playing multiplayer: you must be the server admin or an op, then just run the following command by copy/paste.
/data modify entity @e[name=ā<Pet Name>ā,limit=1] Invulnerable set value 1
Obviously, replaceĀ ā<Pet Name>ā with whatever you have named them via a nametag. If it works, you will get the following message.
Now nothing can kill your pet!
Bonus: if you cannot find your pet, simply type:
/tp @e[name=ā<Pet Name>ā] <Your Username>
However, you must be close to where you lost them, because it wonāt work if they are in an unloaded chunk.
Iām working on a datapack to do this automatically, but this may help you in the meantime.