Zombie siege



Sieges are in-game events that occur when many zombies spawn in a village at night. They occur regardless of how well lit or walled off a village is.

Usually, a whole mob of zombies will concentrate on one door or villager, and in Hard and Hardcore mode, will break wooden doors down, giving entrance to the building. This causes the villagers to flee their homes and get attacked by the zombies on their way out.

Defense
Villagers will enter their houses and close the door before any zombies can get in, but they will not attack.

Iron Golems defend villagers from zombies and other mobs during such attacks and all other times, and can naturally spawn in a 16x16x16 area around the center of the larger villages.

Surrounding a village with a wall and lighting it are staple defenses against normal hostile mobs, especially Creepers. However, they are ineffective for sieges because the zombies can spawn inside even a well-lit village. Zombies may prefer to spawn outside of the village or in the dark when given an access route. If so, this allows players to defend villages by creating pressure plate drawbridges or "kill-channels" that limit zombie entrance.

It is impossible to completely avoid zombie sieges. If every block within the radius of the village has a half slab on top if it, the zombies will often spawn inside blocks, even solid blocks if there are no transparent blocks nearby, then walk towards the villagers through the wall (Confirmed in 1.3.2.) Zombie sieges also do not follow the 24-block rule, meaning they can spawn just a few blocks from the player.

Trapping a villager in a ring of fence posts will likely attract Zombies, giving the player/golem a chance to take the zombies down one by one.

Wolves and Snow Golems may also be stationed to keep the horde at bay, however Snow Golems will be useless in a desert village due to damage incurred from the biome and carry the risk of causing friendly fire with the Iron Golems. Wolves are easy to maintain due to the large quantity of rotten flesh that a horde will yield when defeated.

Hard mode: All doors should be one block above the ground. This still allows villagers to enter but prevents zombies from breaking in, unless they end up spawning inside houses.

Recovery
Villagers repopulate if there is open space in the NPC village. This means that villagers can recover from sieges by having children to repopulate the NPC village, provided there are at least two villagers and enough space in the NPC village. Player-made houses can also cause villagers to repopulate, as long as it is within the NPC village, has a wooden door, and has a 3x3 space inside. Iron Golems lost in the siege will eventually respawn if the NPC village has at least 15 villagers, or can be manually rebuilt by the player.

Unfortunately, these conditions are rarely sufficient to keep villages from being depopulated in short order without active defense by the player. As of snapshot 12w32a, there is an option, albeit a difficult one, to repopulate villages: some villagers attacked will instead be converted to zombie villagers, while zombie villagers may spawn naturally. They can be turned into villagers by splashing them with a splash potion of weakness, then feeding them a golden apple.

Trivia

 * When a zombie is attacking a villager or door, it will usually ignore the player unless the player attacks it.
 * Zombies also attack villager children.
 * Although zombies are the only mob that attacks villagers, Iron Golems still attack other hostile or neutral mobs. This is probably because they can be created by the player for self-defense, not for defending a village; it could also mean that other mobs may lead sieges against villages.
 * If the player spawns a lot of zombies, they will eventually start a siege and all crowd one door.
 * Sieges can occur in player-made villages and mushroom biomes, despite zombies not spawning in mushroom biomes naturally. This is further evidence that sieges are different from standard mob spawning.
 * As of 12w32a, if the player turns mob spawning off with the cheat, sieges can still occur.
 * Early in development, Notch considered adding a gamemode Zombie Siege. It would be you fighting waves of monsters (likely Zombies). This gamemode was, however, never implemented, and has since been abandoned.