Tutorials/Zombie villager farming

This tutorial shows a safe method to separate zombie villagers from zombies as they emerge from a zombie spawner, for the purpose of converting them to villagers to start an underground village or trading hall. This is useful in situations that meet these conditions:
 * You found a dungeon with a zombie spawner in it,
 * You need a village nearby,
 * There are no villages within a reasonable distance, and
 * You have golden apples and potions of Weakness to cure zombie villagers.

An advantage to building up a village like this is that the mere act of curing zombie villagers gives you low prices for trading, especially in Bedrock Edition.

This isn't an early-game build because it requires redstone and brewing components, which are typically found in advanced play. However, it is feasible (and has been tested) in Survival mode as a late-game project.

Mechanics
While there are ways to sort items using hoppers, there is no automated way to sort mobs. It must be done manually and safely.

The idea is to use water flow to sweep the output of a zombie spawner into a hallway that contains a series of pistons that push zombie villagers into a space for conversion, and guide the other zombies to their deaths. The player (you) stands at the end of the hallway to serve as bait, safely behind a stone barrier that zombies cannot cross. The zombies and zombie villagers line up single file in the hallway. You observe the mob in the front of the line, and if it's a zombie, you flip a lever to retract a piston that lets the zombie approach you closer and fall into a mob grinder (or even a drowned farm). If the mob in front is a zombie villager, you push a button that triggers a piston to shove that zombie villager into a hole on the side, where it waits at the bottom for you to cure.

Baby zombies are not blocked by the piston and simply fall into the mob grinder on their own.

Once you have captured a zombie villager, you can place a torch on the spawner to disable it, and then you can cure the zombie villager. Nearby the curing room you would have an underground village prepared, with a bed within 16 blocks and a workstation for the reborn villager. After the new villager claims the bed and workstation, you add another bed and another workstation, restart the spawner, and capture another zombie villager to convert.

When you have two villagers, you can continue adding beds and workstations, and breed the villagers. Or you can ensure great deals on trading by curing more zombie villagers.

Materials
This design needs: • 1 and a source of water

• 1  to disable the spawner

• 1

• 2

• 1

• 3

• 2

• 4

• 1

• 1

Construction
The hole labeled v is for the zombie villager to fall into. The total drop should be at least 3 blocks but not deep enough to harm the zombie villager too much. The zombie villager should fall into a 1×1 space with a closed fence gate as an exit for the cured villager. Elsewhere, you would have stairs going down into a room from which you can access the trapped zombie villager behind the fence gate, and cure it.
 * Ground level

The L-shaped hole is the killing hole. It can be any depth greater than 3. Trapdoors at the front and back of the hole fool the zombies into walking into the hole. The L-shape must be 2 blocks long and 2 blocks wide. The 2-block length ensures that the zombies have enough room to fall in without obstruction when their arms are extended (a zombie doesn't fall into a hole if something blocks its arms), and 2-block width ensures that the zombie still falls in if the head-level piston happens to push the zombie off to the side.

The bottom of the hole can have a single block of water to sweep the zombies into a kill room, such as a drowned farm. When you kill a zombie, or if the zombie drowns in the case of a drowned farm, it drops experience and valuable loot (like enchanted armor) in Hard mode.

Water should force the zombies into the passageway. If water is not used, a zombie villager does not quite stop on the block next to the piston that pushes it into the v hole. It needs to be pushed by water.
 * Foot level

The player stands at position p to act as bait.

The player stands in front of the button, and within reach of the lever.
 * Head level

Operation

 * 1) Stand at the position labeled p, facing the entrance where water flows in.
 * 2) In its idle state:
 * 3) * The redstone torch activates the fast repeater, causing the far piston on the right to extend over the hole labeled v, preventing any mobs from falling into it.
 * 4) * The lever is switched to cause the piston nearest you to extend in front of your face, preventing zombies from falling into the killing hole. This prevents zombies from seeing you.
 * 5) When the flowing water pushes a zombie into the entrance, you can flip the lever to retract the piston, allowing the zombie to see you, move toward you, and fall into the killing hole.
 * 6) * Baby zombies always fall in regardless of the position of the piston.
 * 7) * If you flip the lever to extend the piston before the zombie falls in, the zombie is simply pushed to the side and falls into the side extension of the killing hole.
 * 8) When the flowing water pushes a zombie villager into the entrance, don't flip the lever, leave the piston in front of your face. Instead, push the button. This retracts the piston over the v hole, and then the far piston on the left pushes the zombie villager into the hole. These two pistons then reset their positions.

Once you have a zombie villager, you can flip the lever to allow further mobs to fall into the killing hole while you cure the zombie villager. Or you can place a torch on the spawner in the dungeon to disable it until you're ready to trap another zombie villager.