Zombie siege



Sieges are in-game events that occur when many zombies spawn in a village. 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 commonly 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 (unless you play on peaceful). 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: Curing zombie villagers. Besides spawning as a fraction of ordinary zombies, some villagers attacked by zombies will be "zombiefed" instead of killed. Zombie villagers can be turned into villagers by splashing them with a splash potion of weakness, then feeding them a golden apple, and waiting. However, the cure is not instant -- it will be necessary to confine the "patient" away from living villagers, and usually to protect them from the sun as well. They will emit red particles until they are cured.

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.
 * The chance of trying to start a siege is 10% for each night, but the start may still fail due to other reason. If it does start one, no other sieges will be started that night.
 * The siege consists of upto 20 extra zombies, all spawning randomly near a single spot somewhere near the village perimeter (away from the "village center").

Bugs

 * Seems that at least in 1.4.7, the siege starting process is unable to find any suitable spots to spawn the zombies, and thus no real sieges are started. However, normal spawned zombies can still attack the village just as usual.