as the title says, is there a command that will stop animals from drowning, or taking damage in general, or even just add infinite health and remove hurt animations?
1.12.2 if possible, if its only available in newer versions then ill live with that.
1. You can give them an effect with /effect. I would suggest using resistance but regeneration will also work (aside from the hurt animations). If you only want to stop them from drowning but nothing else you can use water breathing.
In 1.13+ the command would be
/effect give <entitys> <effect> 1000000 255 true
E.g. all pigs should have water breathing:
/effect give @e[type=pig] water_breathing 1000000 255 true
In 1.12, I think you only have to remove the "give".
The disadvantage of this method is that it will not last forever. 1.000.000 seconds are about 11,5 days, this is normally enough for a singleplayer world but on a server you have to renew the effect every 11 days.
2. You can make the animals invulnerable if you spawn them with a command.
as the title says, is there a command that will stop animals from drowning, or taking damage in general, or even just add infinite health and remove hurt animations?
1.12.2 if possible, if its only available in newer versions then ill live with that.
There are 2 ways to do this.
1. You can give them an effect with /effect. I would suggest using resistance but regeneration will also work (aside from the hurt animations). If you only want to stop them from drowning but nothing else you can use water breathing.
In 1.13+ the command would be
E.g. all pigs should have water breathing:
In 1.12, I think you only have to remove the "give".
The disadvantage of this method is that it will not last forever. 1.000.000 seconds are about 11,5 days, this is normally enough for a singleplayer world but on a server you have to renew the effect every 11 days.
2. You can make the animals invulnerable if you spawn them with a command.
ok thank you.