intermediate survival

How to Build an Iron Farm in Minecraft [1.21]

Step-by-step guide to building an iron farm in Minecraft 1.21. Covers iron golem spawning mechanics, a simple 3-villager design, water collection systems, expected output rates, and common troubleshooting fixes.

Iron is the most consumed resource in Minecraft. Between anvils, hoppers, rails, and armor, you will always need more. An iron farm automates iron production by exploiting iron golem spawning mechanics, generating hundreds of iron ingots per hour while you do something else. This guide explains the spawning rules, walks through a simple and reliable design for 1.21, and covers every common mistake that stops farms from working.

How Iron Golem Spawning Works in 1.21

Iron golems spawn through a village mechanic. Understanding the exact rules is the difference between a working farm and a decorative box.

The Core Requirements

For an iron golem to spawn, you need all of the following conditions met simultaneously:

  1. At least 3 villagers within a village boundary
  2. Each villager must have a bed they have claimed (linked to)
  3. Each villager must have a workstation they have claimed
  4. At least 1 villager must have slept recently (within the last 20 minutes of game time)
  5. At least 1 villager must have worked at their workstation recently
  6. A villager must be panicked (seen a zombie or other hostile mob)

When a panicked villager gossips with other villagers about a hostile mob, this triggers an iron golem spawn attempt. The game checks a 16x13x16 area centered on the villager for valid spawn positions. If a valid spot exists (solid block below, 2 air blocks for the golem body), an iron golem appears.

Spawn Rate Mechanics

Iron golems have a spawn cooldown. After a successful spawn, the village waits at least 30 seconds before attempting another spawn. In practice, a well-designed farm produces one iron golem every 35-50 seconds depending on how quickly the villagers gossip and panic.

Each iron golem drops 3-5 iron ingots when killed. Combined with the spawn rate, a single-cell iron farm produces roughly 300-400 iron ingots per hour.

Java vs Bedrock Differences

The mechanics described above apply to Java Edition. Bedrock Edition uses different rules:

  • Bedrock requires 10 villagers and 20 beds minimum for iron golem spawning
  • Spawn rates are slower on Bedrock
  • The panic mechanic works differently (villagers need to sleep and then be scared)

This guide focuses on Java Edition 1.21 designs. Bedrock players should look for Bedrock-specific farm layouts, as the villager counts and spacing differ significantly.

Simple Iron Farm Design (3 Villagers)

This design is compact, easy to build, and produces around 350 iron per hour. It uses the minimum 3 villagers with a zombie scare mechanism.

Materials Needed

MaterialQuantity
Building blocks (any solid)~80
Glass blocks or panes~20
Water buckets4
Hoppers4
Chest (double)1
Beds3
Workstations (any type)3
Lava bucket1
Signs2
Trapdoors (any)1
Name tag1
Boat1

Step 1: Build the Platform

Build a solid platform at least 20 blocks above the ground. This prevents iron golems from spawning on the terrain below instead of in your collection system. The platform should be 7x7 blocks.

The height matters. Iron golems check for valid spawn positions in a vertical range. Building high enough ensures the only valid spawn floor is your farm platform.

Step 2: Create the Villager Chamber

On top of the platform, build a 3x3 enclosed room, 3 blocks tall. Place:

  • 3 beds along one wall
  • 3 workstations (composters are cheapest) along the opposite wall
  • Leave the center open so villagers can pathfind between beds and workstations

The room must have a ceiling. Villagers need to be enclosed so they cannot wander away. Use glass for at least one wall so the villagers maintain line of sight to the zombie (next step).

Step 3: Set Up the Zombie Scare

This is what drives the farm. A zombie visible to the villagers keeps them in a permanent state of panic, which triggers iron golem spawn attempts.

  1. Capture a zombie (lure one into a boat or minecart at night)
  2. Name the zombie with a name tag so it does not despawn
  3. Place the zombie in a 1x1 glass enclosure at eye level with the villagers, directly outside their chamber
  4. The zombie must be within 10 blocks of the villagers and have line of sight through glass

The zombie needs to be in a position where it cannot reach the villagers but they can see it. A glass-enclosed space adjacent to the villager chamber works perfectly. Place a trapdoor above the zombie to prevent it from escaping.

Important: The zombie must be in shade or have a roof. Zombies burn in sunlight. If your zombie burns, the farm stops.

Step 4: Build the Kill Chamber and Collection System

Iron golems spawn on the platform area around the villager chamber. You need to funnel them to a kill point.

  1. Extend the platform outward from the villager chamber by 8 blocks on each side (making the total spawn area roughly 16x16)
  2. Build walls (2 blocks high) around the entire platform edge
  3. Create water channels on the platform floor that push toward a central hole
    • Place water sources at the edges so water flows toward the center
    • The water carries spawned golems to the drop point
  4. At the center, dig a 1x1 hole with signs on two sides to hold back the water
  5. Below the hole, place lava (held up by the signs) to kill the golems
  6. Below the lava, place hoppers leading into a double chest

The flow path is: golem spawns on platform, water pushes golem to center hole, golem falls through signs into lava, lava kills golem, drops fall through into hoppers, hoppers feed chest.

Step 5: Water Channel Layout

The water channels are the trickiest part. Here is a reliable layout:

  1. The spawn platform is a ring around the villager chamber
  2. On two opposite sides, place water sources along the wall so water flows toward the center channel
  3. The center channel runs the full length of the platform, with water flowing toward the kill hole
  4. All water should ultimately push golems toward the single collection point

Each water source flows 8 blocks. Plan your platform dimensions so water reaches the center from every edge. A 16x16 platform with sources along two opposite walls and a center trench works reliably.

Step 6: Testing the Farm

Once everything is placed:

  1. Wait for night, then sleep in one of the beds yourself (this resets villager sleep schedules)
  2. Wait for villagers to claim beds and workstations (they make green particles when they link)
  3. Confirm villagers can see the zombie (they shake and show sweat particles)
  4. Wait 1-2 minutes for the first golem spawn

If golems spawn, the farm is working. Check the collection chest after 10 minutes. You should see 50-70 iron ingots accumulating.

Scaling Up: Multiple Cells

A single cell produces ~350 iron per hour. To increase output, build multiple independent cells spaced at least 100 blocks apart (to prevent village merging). Each cell is a self-contained farm with its own 3 villagers, beds, workstations, and zombie.

CellsApproximate Iron/Hour
1300-400
2600-800
41,200-1,600

Most players find one cell sufficient. A single cell produces enough iron for a hopper every 3 minutes, which covers even heavy automation projects.

For a trading hall that uses iron heavily, check our villager trading guide to see which trades consume iron and plan your farm output accordingly.

Expected Output Rates

Under ideal conditions in Java Edition 1.21:

  • 1 golem per 35-50 seconds
  • 3-5 iron ingots per golem
  • 300-400 iron ingots per hour from a single cell
  • Occasional poppies (iron golems also drop poppies)

The variance comes from golem spawn timing (the gossip and panic cycles are not perfectly deterministic) and the 3-5 ingot drop range.

AFK at the farm for maximum output. The farm only works while a player is within simulation distance (typically 128 blocks on default settings). If you leave the area, spawning stops.

Common Mistakes and Troubleshooting

No Golems Spawning

Check villager-bed links. Every villager must be linked to a bed. Break and replace all beds, then wait for villagers to claim them (green particles). If another bed exists nearby (in a village or your base), villagers may link to that bed instead of the farm beds.

Check villager-workstation links. Same as beds. Break and replace workstations. Ensure no other workstations are within 48 blocks that could steal the link.

Check zombie line of sight. Villagers must actually see the zombie. Use glass (not solid blocks) between them. The zombie must be within 10 blocks horizontally. If villagers are not showing panic particles (sweat drops), they cannot see the zombie.

Check height. If your farm is too low, golems may spawn on the ground below instead of on your platform. Build the farm at least 20 blocks above any solid surface.

Golems Spawning Outside the Farm

This happens when there are valid spawn positions outside your collection area. Solutions:

  • Remove any solid blocks within 16 blocks horizontally and 13 blocks vertically of the villagers (except your farm platform)
  • Build the farm high in the air, far from any terrain
  • Use bottom slabs or glass below the platform to eliminate spawn surfaces

Villagers Not Restocking Trades

If you are also using these villagers for trading, they need to pathfind to their workstations to restock. The farm design above allows this because workstations are inside the villager chamber. However, if villagers are constantly panicking, they may not work at their stations. This does not affect iron production but can affect trade restocking.

Farm Stopped Working After Relogging

When you log out and back in, villagers need to re-establish their schedules. They must sleep at least once and work at least once before golem spawning resumes. Wait 1-2 in-game days after loading the area for the farm to stabilize.

Zombie Despawned

If you forgot to name tag the zombie, it will despawn when you move far enough away. Always use a name tag. Any name works. The zombie is the heart of the farm; without it, villagers do not panic and golems do not spawn.

Golems Getting Stuck in Water

If golems are not reaching the kill chamber, your water flow may have dead spots. Iron golems are 1.4 blocks wide and 2.7 blocks tall, so they need adequate channel width. Ensure all water flows toward the center without leaving stagnant zones where golems can get stuck against walls. Widening the center channel to 2 blocks helps.

Optimizing Your Iron Farm

AFK Position

Stand within 128 blocks of the farm (simulation distance) but not so close that you interfere with mob spawning. A good AFK spot is directly above or below the farm, within range but out of the way.

Lighting

Light up the farm platform and surrounding area completely. You do not want other hostile mobs spawning on your platform and interfering with golem spawns. Place torches or other light sources on every surface within and around the farm. The zombie enclosure is the only place a hostile mob should exist.

Cat Spawning

Villages also spawn cats. If too many cats accumulate, they can cause minor lag. Add a lava blade or cactus at the golem kill point to also eliminate cats that fall through. Alternatively, let them accumulate and name them if you want farm pets.

Integration With Other Farms

Iron farms pair well with other villager-based farms. If you are building a villager breeder, position it near (but not overlapping with) the iron farm to supply replacement villagers if any die. Keep the breeder outside the iron farm’s village boundary (64+ blocks away) to prevent bed-claiming conflicts.

Iron Farm FAQ

Do I need a specific biome? No. Iron farms work in every Overworld biome. Build wherever is convenient.

Can I use any workstation? Yes. Composters are cheapest (made from wooden slabs) but any workstation works. The villagers just need to be employed, not a specific profession.

Does difficulty level matter? The farm works on all difficulty levels. On Peaceful, the zombie cannot exist, so the farm does not work on Peaceful. Play on Easy, Normal, or Hard.

Can I build this underground? Yes, as long as there are no other valid spawn surfaces within the golem spawn check range. Underground farms eliminate the height requirement since there is no ground below to compete for spawns.

How do I get villagers up to the farm? Use a water elevator (soul sand + water column) to push villagers vertically. A boat elevator also works: place boats in a vertical stack, and villagers transfer between them upward. For horizontal transport, push a villager into a boat and pilot it or use water streams. Our villager trading guide covers transport methods in detail.