Tutorials/Iron golem farming

Iron golem farming uses village mechanics to produce iron, as well as byproducts such as poppies and string. Usually, an iron golem farm is a player-constructed village in which golems are spawned and then either killed immediately, or moved to a holding cell outside the village boundary for later killing. Iron golem farming is preferable to other methods of iron farming from zombies and skeletons due to giving a much higher quantity of iron.

Overall spawning requirements
An iron golem needs an available volume in which to spawn. There must be at least 3 transparent blocks (preferably air, though other transparent blocks like glass) above the spawning surface, which must be solid and flat (but not a slab).

Cat cap
Villages spawn cats also, one cat for every four valid beds and one villager. The cat population is capped at 10 cats per village. Neither iron golems nor cats can spawn once the cat cap is reached. Because your farm will start producing cats before it's ready to produce iron golems, you must be sure that your farm kills enough cats to keep the population under 10. A few cats hanging around doesn't present a problem, but you should occasionally patrol the area for cats hiding and other places where they may go or get stuck, and kill them. If the cap is reached, cats must be killed near enough to the villagers (preferably within 16 blocks) so that the villagers are aware that the cat has died, or they will not cause a new iron golem to spawn. Villagers won't notice the death of cats that have wandered off too far or fallen off a cliff and are still hanging around below. If the cat cap has been reached, killing cats too far away has no effect, and iron golems cannot resume spawning.

Java Edition
In Java Edition, a villager may attempt to spawn an iron golem if it enters a state of panic upon seeing the same zombie as three other villagers within 10 blocks, while not having a golem alive within 16 blocks. The villagers must have worked and have slept before the golem can spawn.

When villagers spawn a golem, they wait 30 seconds for the golem to kill the zombie. If the zombie still exists, they wait an additional 5 seconds and then spawn another golem.

The villagers may also spawn an iron golem even if they are not panicking, but the chance is a little lower. Also, they have to work and sleep after to spawn another golem.

Bedrock Edition
In Bedrock Edition, villagers are not required to sleep or have a workstation in order to spawn iron golems. For an iron golem to spawn, the following conditions must be met: The spawn rate doesn't seem to be affected by increasing the number of villagers. Increasing the beds beyond 21 registers a second village merged with the first, and each village has its own center. Two sets of 21 beds, with 20 villagers, can spawn two golems but the spawn center is unpredictable.
 * The village has exactly 21 beds
 * The village has at least 10 non-nitwit villagers, each of whom has claimed a bed

Village separation
A village by itself has a 64×64 boundary around the village center. For two villages to remain separate without merging, they must have two whole chunks between them that contain zero villages. At the maximum rendering distance, it is possible to have two individual iron farms within view but adequately separated so they don't merge into one village. This way the spawn rate can be doubled.

Village center
A village needs a minimum of one bed and one villager to exist. A bell on its own doesn't establish a village. A bell can define the center of a village once the village exists.

The center of the village determines the area in which iron golems can spawn. The center of the village can be either the pillow-end of a specific bed, or a bell. A bell placed in a village gets detected by at least one villager (indicated by green particles over the bell and the villager). This detection event sometimes resets the village center to the bell, but sometimes the center doesn't change, or resets to an existing bed.

After the bell is placed, sparkling particles should appear above it, and above the villager who connects with the bell, and that villager's bed can be destroyed to establish the bell as the new center. This generally works for a single 21-bed village but with more beds, separate villages are registered and the additional village centers are unpredictably located and cannot be moved as desired. For a farm using more than 21 beds, a spawning platform that extends 8 blocks horizontally in all directions from the bed pillows can capture all of the iron golems spawned. The farm in this case must be designed to prevent iron golems from spawning among the beds, such as using carpet on solid surfaces that should not have spawns, and creating full-block solid ceilings above the beds.

If the villagers have no access to their claimed beds, they attempt to claim other beds during the night. This causes the village center to reset. One must either let the villagers sleep in their beds, or place blocks over the pillows of all the claimed beds if the villagers are restricted from reaching their claimed beds.

The village center might also change if a villager is killed and a baby villager is born later to take its place. To prevent this, villagers can be immobilized at their beds by placing glass blocks over them while they sleep. Trading with immobilized villagers is still possible if a job site block is available adjacent to the bed for replenishing trades, and the villager has claimed that specific job site. You can place one job site block and observe which villager gets green sparkling particles, and then break the block and move it next to that villager.

Spawn volume
An iron golem needs a solid flat surface on which to spawn, with at least three transparent blocks above. Iron golems spawn with their feet occupying a 17×6×17 volume around the village center &mdash; 8 blocks horizontally in all directions from the center block, and 3 blocks above and below the bottom of the center block. This means the top of the spawning surface can be no higher than 1 block above the top of the bell. If a bell is the village center, the golem's feet can spawn within 3 blocks above or below the bottom of the bell.

If the village center is 3 or more blocks above ground, iron golems cannot spawn on the ground; a spawning surface is needed within the allowable spawn volume.

In version 1.11 there is a bug that sometimes causes golems to spawn stuck partway in the ground with its head visible above ground. Typically when this happens, they are spawning 2 or 3 blocks below the village center but the ground is higher and valid as a spawn platform. Making the spawn platform 2 or 3 blocks below the village center avoids this problem.

Legacy Console Edition
Iron golem farms in Legacy Console Edition (as well as Java and Bedrock before the Village & Pillage update), are based on doors. Iron golems spawn in a 16×6×16 volume centered on the geometric center of at least 21 doors with at least 10 villagers nearby.

Java Edition videos

 * WeirdWilliam's Iron Farm 1.14


 * DocM's Iron Farm


 * Frilioth's 1.14.3 Iron Farm

Bedrock Edition videos
Village mechanics describing the mechanisms by which iron golems spawn in villages