#how to make sure that existing mobs wont despawn
1 messages · Page 1 of 1 (latest)
zombie villagers
If you set PersistanceRequired to true on any mob, it won't despawn
how
You'll need the /data command: https://datapack.wiki/wiki/command/data
The data command is used to modify and fetch NBT data of blocks, entities and storages.
execute as @e run data merge entity @s {PersistenceRequired:1b}
execute as @e run data merge entity @s {PersistenceRequired:1}
i tried both
it doesnt owrk
could you perhaps be a little more specfic and give an example of a mob that despawned?
Because the above (if no red-text is in the output) should have achieved the no-despawning. This does not prevent zombies and skeletons from burning and enderman from dying/teleporting when it rains.
Are you using a modded client? Are you using mods? Both could very well cause the above to be ignored.