Minecraft – When do Snow Golems despawn in Minecraft

minecraft-java-edition

I keep a boxed-in Snow Golem in my house. Twice, it has spontaneously vanished. The second time, I was around and I noticed that there was a pile of snowballs, as if it had been killed. However, I am reasonably confident in my house lighting and that there certainly wasn't a mob in the room then.

What exactly can cause snow golems to die?

The only discusssion of spontaneous despawning I could find on Minecraft Wiki clearly does not apply to Snow Golems since they last much longer than one minute.

(Please answer with experimental or code evidence (your own or a link), not just passing on what you've heard. There are a lot of urban legends.)

Best Answer

Might as well provide an answer based on the source code here.

A snow golem is an EntitySnowman, which inherits its logic from EntityGolem. It will never despawn. (That is, calling canDespawn() on an EntitySnowman always returns false.) So, your snow golem is absolutely not despawning on its own.

Why is it disappearing? That I don't know. If it gets touched by fire, water, rain, or attacked by any other mob, it can easily die. If none of those things are happening, then it probably is some kind of suffocation glitch - maybe it wanders into a block and gets stuck somehow.