Zombie siege

Zombie sieges are in-game events where many zombies spawn in and attack a village.
== Mechanics ==
At midnight each night (tick 18000 in Minecraft time), there is a 10% chance for the game to attempt a zombie siege that night. If a siege is to occur, attempts are made each tick to start the siege until either a siege is successfully started or the sun rises. Specifically, the siege attempt is abandoned when the sky light level reaches 12. However, inclement weather can allow siege start attempts to continue well past dawn since it reduces the sky light level.
=== Siege start checks ===
A player is a candidate for a siege if they are in a village and that player is not in spectator mode or in a biome with the without_zombie_sieges tag.
Ten attempts are made to choose a random siege starting point: first, a point 32 blocks away from the player in a random horizontal direction is chosen, and then a location is chosen (as described below) as if to spawn one zombie. If that succeeds in finding a valid zombie spawning point, the siege is started at the chosen starting point. If all ten attempts fail, the entire siege attempt fails, but another siege may be attempted on the next game tick.
Players are always checked in order, so as long as one player remains a valid candidate later players will not be checked.
=== Zombie spawning ===
During a siege, 20 attempts are made to spawn a zombie over the course of 3 seconds. For each zombie, 10 attempts are made to randomly choose a valid spawning point on the surface (i.e. highest non-air block at given horizontal coordinates) within a 16×16 horizontal distance around the chosen point. If a valid spawn point is found, a zombie is spawned.
Zombies spawned within a siege ignore player proximity and the presence of other mobs. Only the minimal spawning conditions are checked:
* Light level must be appropriate for hostile mob spawning.
* The surface block must not prevent spawning.
* The block must be within a village.
Zombie villagers, husks and drowned are never spawned as part of a siege, but all other variations (e.g. baby, jockey, and equipment) are determined as for normal random spawns.
The zombies that spawn as part of a siege behave in the same manner as normally-spawned zombies; they attack all villagers within sight, and villagers and iron golems react accordingly. The zombies despawn as usual if the player is far enough away.
== Defense tactics ==
== Recovery ==
If at least two villagers survive the siege, the villagers can breed and repopulate the village. Without player intervention, however, it is likely for villages to be wiped out by sieges and randomly-spawned zombies, and all the villagers would be either dead or zombified. 
Even if no villagers survive, a village may be repopulated by curing zombie villagers, or by luring in villagers from another village.
== Video ==
== History ==
== Issues ==
== Trivia ==
* Sieges can occur on mushroom fields if the triggering player is in an adjacent biome.
== Gallery ==
File:Zombies breaking down.png|A group of zombies, two of which are villagers, breaking down a wooden door.
File:Iron Golem backing off a village during a siege.png|An iron golem killing a zombie during a siege, preventing the zombie from breaking down the door.
File:Zombie siege over when it's morning.png|A siege ending because of the zombies burning in the daylight.
File:Zombies burning in a desert..png|A siege in a desert (where it never rains) during rain in another biome. One zombie burns in sunlight while two others are protected by their helmets.
File:Zombie hurting a villager.png|A zombie attacking a villager while the other one is trying to run.
File:Villagers taking cover.png|3 villagers taking cover in a large house during a zombie siege.
== See also ==
* Raid
*Zombie
== Notes ==
== References ==
de:Zombiebelagerung
es:Horda de zombis
fr:Siège de zombies
ja:ゾンビ襲撃
ko:좀비 전투
nl:Zombiebelegering
pl:Oblężenie zombie
pt:Invasão zumbi
ru:Осада
uk:Облога
zh:僵尸围城
Category:Rewritten gameplay