I am making a minecraft map and i have still piglins that can't be zombified or don't have an AI. When I go far away from the chunk the piglin is in, it despawns everytime.
Steps to reproduce
type this code into minecraft chat (this is the exact code I used to spawn the piglin in!) /summon minecraft:piglin ~ ~ ~ {IsImmuneToZombification: 1, NoAI: 1, Invulnerable: 1, Rotation:[215f]}
leave the chunk where the piglin is in
Enter the chunk again and the piglin will be gone!
Comments 6
You can add PersistenceRequired:true and they will not despawn. Like this:
/summon minecraft:piglin ~ ~ ~ {IsImmuneToZombification: 1, NoAI: 1, Invulnerable: 1, Rotation:[215f],PersistenceRequired:true}
For hoglins, you need to feed them crimson fungi (or fungus for singular) in order for them to not despawn. Yes you will have to drop a item that is gold, except for gold ingots (Note: dropping gold ingots doesn't make them persistent).
WAI: Piglins will despawn unless named, or given a "gold" item.