TransWikia.com

Why do my friends' and my pets keep despawning?

Arqade Asked on May 20, 2021

So, I spawn some zombie Piglins and/or Slimes because they’re cute. I name them, give them some potion effects to make them pretty much immune to receiving damage, and for the zombie Piglins give it maxed out armor. They chill in my base for a couple days and then randomly disappear but it’s like only 1 or 2 that disappear of the multiple zombie Piglins or Slimes (I don’t have more than 5 of them in the base at once, so I know that it isn’t entity cramming). So, why does this happen? My graveyard is getting too full too quick and My friends yell at me when they come online and their pets are gone because it happens for them too. (This is in realms btw)

One Answer

Only pets that you have actually tamed(horses,cats,dogs,parrots,foxes) or nametagged mobs are marked with the PersistenceRequired tag. Because I assume you are in creative mode

/execute as @e[type=<mob>] run data merge @s {PersistenceRequired:1b}

Run the command after you spawn your mobs, and they should never despawn. And, regarding them not taking damage, you can put this in a repeating command block:

/effect give @e[type=<mob>] resistance 1 4

You might also wanna get rid of the chat hogging, so run

/gamerule commandBlockOutput false

Answered by Korogue on May 20, 2021

Add your own answers!

Ask a Question

Get help from others!

© 2024 TransWikia.com. All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP