Is there any other simple way to prevent mob despawning other than using a nametag?
I am a beginner Minecraft player playing in survival mode (Minecraft Java 1.18) and I just wanted to make one iron farm and all the construction are done except keeping the zombie from despawning and I am not that familiar with searching for nametag as it is usually rare.
So, are there any other ways in which I could prevent the zombie from despawning?
According to the https://minecraft.fandom.com/wiki/Spawn#Despawning , mobs can be unable to despawn in the following conditions, filtered out for your needs:
- Is a passenger to another mob.
- Is riding a boat or minecart.
- Spawned as part of a generated structure
- Had something added to their inventory including having something dispensed upon them (such as a saddle) or something they have picked up, but never for anything they spawn with.
I also read about how Villagers even https://minecraft.fandom.com/wiki/Villager#Iron_golem_summoning Iron golems, simply put, when they are panicking, with two other villagers who both also desire golems, they will attempt to summon one.
Villagers will https://minecraft.fandom.com/wiki/Villager#Panicking when they see a mob that is hostile to them. To "see" a mob, the villager must have an unobstructed view towards the mob, and be within a certain range (for a zombie, it's 8 blocks).
First, let's consider the first option. Assuming you want to do everything in survival, no cheats, the only way for it to work is having a Chicken Jockey, which is extremely rare, and you're better off having a name tag.
For the second option, it could technically work, the villager and see the zombie, and will panic and summon an Iron Golem, you should test this, since I'm not sure. In most Iron farms, the zombie is jumping or moving up-and-down, but I'm unsure if this affects the summoning behaviour.
Third option, only Drowned is applicable, since they spawn in Ocean Ruins. I'm a bit suspicious about this 3rd rule, since I'm pretty sure they will despawn, so this is the last ditch option.
Finally, the fourth option. This should work pretty well, when you get your zombie in, use a dispenser to give them armor, or a sheared pumpkin. So this is the one you should use. Note that if you're throwing an item to a zombie to have it pick it up, there is only a chance it will pick it up, for more information, see https://minecraft.fandom.com/wiki/Zombie?so=search#Geared_zombies .
I hope all of this helped