Tutorials/Zombie siege defense

Visiting or staying in a village at night can result in a Zombie siege: Zombies will spawn near the outskirts of the village, regardless of light level, and attack the villagers. Alongside Raids, Zombie Sieges are the biggest threat to a Village.

Mechanics
While the villagers will try to hide in their houses, some may fail to get to safety. In addition, on the Hard difficulty level zombies can break down doors.

These sieges can kill off all the villagers within a couple of nights. (On Normal or Hard difficulties, most or all of the villagers would become zombified, eventually dying in the sun without player intervention) All villages have at least one iron golem to help defend them, but even with this assistance almost any village is likely to become depopulated within a few sieges unless the player provides help. Even if two villagers were to survive, villager breeding is much too slow to recover from the nightly losses. Even with two villagers, they would need to become willing and also need to be at least one unclaimed bed within range before they will breed.

If there are less than two villagers remaining at any time, they will be unable to breed their numbers back up, and the village will not be viable.

If there are no valid spawning locations within the "siege zone" at Y values between 3 below and 2 above the village's center, sieges cannot start in that village. This can also be used to force any sieges to start at a particular location.

If all players in the Overworld sleep before midnight, sieges will not be able to start. Similarly, if all players remain outside the bounds of villages between midnight and dawn, there will be no candidate villages.

Tactics
Accordingly, player assistance is needed to help a village survive. Some suggestions:
 * 1) Hiding 3 villagers (3 villagers are needed for breeding) in a well-lit 1x2x2 hole under (or above) the village, allows for safe villagers to repopulate the village. While this method will not prevent a siege or protect any other villagers, a player will not lose the village.
 * 2) While it will not help with sieges as they ignore light levels, light up the entire village to avoid randomly-spawned zombies attacking the villagers and other randomly-spawned mobs attacking the player. Note several part of the naturally-generated village buildings lack sufficient lighting to prevent spawns, and all buildings with flat roofs or other ledges will need those roofs and ledges lit.(especially desert village)
 * 3) Sieges begin at midnight. If all players sleep before midnight or wait outside of any village until dawn, sieges cannot start. Until the village is protected from random spawns, sleeping at dusk will also avoid attacks by randomly-spawned zombies.
 * 4) Sieges only occur in villages with at least 10 beds and 20 villagers, so keeping the bed count or population below this number can prevent sieges. Randomly-spawned zombies will still attack, however, and could wipe out a small village.
 * 5) * With a population over 20, it can be advantageous to add many more beds to the village to increase the population, increasing the chances that enough villagers will survive an attack to repopulate.
 * 6) Siege zombies are spawned near the outskirts of the village. A wall or fence around the village inside this boundary will keep them out.
 * 7) * For a compact village with a 32-block radius, the wall must be within a circle with radius 20.
 * 8) * A small guardhouse with doors just under 65 blocks from the village center and one villager can expand the village radius. Be sure to protect that villager from siege zombies!
 * 9) While siege zombies cannot spawn on bottom-half slabs, glass, farmland and other transparent blocks, unlike random spawns they can spawn on the solid block underneath so slabbing the area will not work as a defense.
 * 10) * Several layers of transparent blocks can serve to trap the spawned zombies, such that they will despawn or suffocate without being able to reach the villagers. It may also result in the solid blocks being below the vertical range for the spawning zone.
 * 11) * Siege zombies won't spawn in water, so surrounding a village with bottom-half slabs over a pool of water will prevent spawning.
 * 12) On hard difficulty, zombies can break doors. But they will only do so if they can stand directly in front of the door. Thus, hanging doors flush with the outside wall and one block up will allow villagers and players to open the door and jump into the doorway while preventing zombies from breaking in. The knocking sound as they jump and momentarily start to break the door will also announce their presence.
 * 13) * Remember, though, that villagers will open the door at dawn, before any nearby zombies finish burning. Helmeted zombies won't burn.
 * 14) Iron golems will attempt to kill any zombies. Snow golems may serve as a distraction, as their snowballs may cause the zombies to attack them rather than the villagers. Similarly, villagers trapped in a ring of fences may distract zombies from more vulnerable villagers.
 * 15) If the only goal is to keep the villagers safe (or as a temporary measure until walls are built), wait until the villagers have gone indoors (in centrally-located buildings), then place blocks or fence gates outside doors to barricade all the villagers inside their houses.  The villagers won't be able to wander, and the zombies won't be able to attack them.
 * 16) The player can also build a mini-version of a skyscraper. Although this requires resources, it will be worth it. Build a small hollow tower with stairs in sides of it. Leave one stair place empty. Put a sticky piston and some redstone with lever (which leads to the outside the building) inside the tower. Fill the empty stair slot with stairs. Build an upside house where villagers can hide. You're ready! Although the villagers may not get down to the ground, this method is the most efficient method to build a sky village. Use the lever and piston to retract the stairs, so zombies can't get up there.
 * 17) If the player has the ability to make potions, a Splash Potion of Healing is an excellent weapon.  This will damage zombies within a certain area, and will not damage the villagers.
 * 18) If houses are only two blocks high, zombies can only spawn outside, as they must have a transparent block above them.

After an attack, whether from a siege or from randomly-spawned zombies:
 * 1) Each morning, the player should quickly replace any doors that have been broken. Don't try replacing the doors with iron doors – the zombies can't break them, but villagers can't open or close iron doors either.
 * 2) Zombies will not merely kill villagers, but can convert them to zombie villagers (50% chance on Normal difficulty, 100% on Hard). Also, random zombie spawns have a small chance of being Zombie Villagers. If a player has been to a Nether fortress, they may be able to cure these unfortunates as follows:
 * 3) * Splash them with a Potion of Weakness
 * 4) * Feed them a golden apple
 * 5) * Wait. The cure takes several minutes, so the player must prevent them from burning or otherwise dying (or despawning) before they recover. Luring them inside an empty house and then barricading them in can work well. If the zombie is damaged, splash potions of harming can be used to heal it a little, increasing its chances of surviving.
 * 6) Curing naturally-spawned Zombie Villagers can repopulate a desolate village or allow a player to build a village from scratch. Once two villagers are in the village (and the village has enough unclaimed beds), a player can cause them to start breeding by giving them appropriate food.

教程/防卫僵尸围城 Tutoriales/Defensa ante hordas de zombis