What a fence does in Minecraft
A fence is a 1.5-block-tall barrier that mobs cannot jump over, which makes it the cheapest reliable wall in Minecraft. You can craft fences from any wood type, plus a non-flammable nether brick version that holds up around lava and ghasts.
Most players use fences for two things: keeping animals penned in pastures, and stopping zombies, skeletons, and other hostile mobs from wandering into a base at night. Fences also act as tether points when you attach a lead to a horse, llama, or other passive mob.
This guide covers how to craft each kind, how connection rules work, the quirks that catch new players, and the differences between Java and Bedrock that matter when you build.
How to craft fences
You craft a wood fence with four wood planks and two sticks of the matching wood type. The recipe fills the middle and bottom rows of a crafting table in this pattern:
- Top row: empty, empty, empty
- Middle row: plank, stick, plank
- Bottom row: plank, stick, plank
One craft gives you three fences. Use a crafting table; the 2×2 inventory grid is too small for this recipe.
For nether brick fence, the recipe uses four nether brick blocks and two nether brick items (the small dropped item you get from smelting netherrack):
- Middle row: nether brick block, nether brick, nether brick block
- Bottom row: nether brick block, nether brick, nether brick block
That craft yields six nether brick fences, which is a better rate than wood if you have the materials and a path to a nether fortress.
Every type of fence in the game
Current versions ship with one fence variant for each wood family, plus the nether brick fence:
- Oak fence
- Spruce fence
- Birch fence
- Jungle fence
- Acacia fence
- Dark oak fence
- Mangrove fence
- Cherry fence
- Pale oak fence
- Bamboo fence
- Crimson fence (nether stem)
- Warped fence (nether stem)
- Nether brick fence
Wood fences from overworld trees burn. Crimson and warped fences, despite looking like wood, are made from nether stems and don’t catch fire. Nether brick fence doesn’t burn either, and it’s the only fence that connects visually to nether brick blocks.
How fences connect to other blocks
Each fence post auto-checks its neighbors and draws a short horizontal rail to any solid full block or other fence beside it. That’s why a row of fences looks like a continuous fence and not a line of separate posts.
A few rules drive what connects:
- Two fences of the same material always connect.
- All wood fences connect to each other, even across wood types. An oak fence next to a spruce fence still draws a rail.
- Wood fences do not connect to nether brick fences. The two materials stay visually separated, which is a problem if you’re mixing them in one pen.
- Fences connect to any solid full block face beside them, including stone, planks, and full glass blocks.
- Fences do not connect to slabs, stairs, or other partial blocks; the rail stays inside the fence post.
If you want a clean pen, stick to one fence material per pen, or hide the join behind a fence gate.
Using fences as a mob barrier
A fence is 1.5 blocks tall visually, but for mob pathfinding it counts as a full 2-block obstacle, so a zombie or skeleton cannot step over or jump over it. A single row of fences is enough to wall off a pen as long as the fences sit on solid ground.
A few cases where the barrier breaks:
- Spiders can climb most surfaces, but they cannot climb fences. A fence-only wall stops a spider.
- Endermen can teleport over any wall, fence included. If you’re walling off an enderman, you need a roof too.
- Phantoms ignore walls completely and attack from above. Again, you need a roof.
- Villagers and players can sometimes hop over a fence if there’s a slab or stair next to it that gives them a step up. Don’t put step-up blocks next to your fence line.
For a normal animal pen or a perimeter wall around a base, one row of fences with corner posts is plenty. There’s no need to double up.
Attaching leads to a fence post
A lead is a short rope that ties a passive mob to a fence. Hold the lead, right-click the mob to attach it, then right-click the fence to anchor the other end. The mob will wander in a small radius around the post.
Things to know:
- Any fence works as an anchor, including nether brick fence.
- A single fence post can hold leads from several mobs at once. There’s no in-game limit, though leads get tangled past about four mobs in practice.
- If the mob walks too far from the post (about 10 blocks), the lead snaps and drops as an item.
- Leads do not work on most hostile mobs. They do work on striders, hoglins, and tamed wolves.
For a long trip, fence-anchor a pet at each camp instead of leading it through every section. If you take damage while moving, you can lose the lead.
Fence gates and how they fit in
A fence gate is the companion block to fences. You open a gate by right-clicking it, the gate swings, and mobs cannot follow because the open gate still counts as a barrier from their pathfinding side.
Craft a fence gate with two planks and four sticks of the matching wood:
- Top row: empty, empty, empty
- Middle row: stick, plank, stick
- Bottom row: stick, plank, stick
You get one gate per craft.
One quirk worth knowing: in Java, a fence gate sits one block lower in collision than a fence next to it, which means a player can step out of a pen by jumping toward the gate even when it’s closed. A villager will sometimes do the same, especially when there’s a job site block on the other side. If you have a villager workstation near a fence-and-gate pen, expect them to wander.
Two fixes that actually hold:
- Put a half-slab inside the pen at the gate threshold so the villager loses the step-up.
- Use two stacked gates and only open the bottom one when you’re entering. Cosmetic, but reliable.
Pathfinding and the fence trick
Mob pathfinding treats a fence as solid for movement but transparent for line of sight. A zombie outside your pen can still see you and will keep walking into the fence, which is loud at night but harmless. The mob won’t path around it unless there’s an obvious route.
This is the basis of the fence trick for early-game mob farms: you stand on top of a fence post (or just behind one), a zombie pathfinds toward you, hits the fence, and can’t reach you. You hit them with a sword from above. Cheap, no iron required, works from day one.
Java vs Bedrock differences worth knowing
Most fence rules are identical across both editions. Two real differences:
- In Bedrock, a fence post sometimes blocks an arrow that would pass through cleanly in Java. The Bedrock hitbox extends slightly higher.
- Bedrock has historically had more cases of mobs glitching through fence corners, especially with two fences meeting at a diagonal. If you build a pen on Bedrock, stick to 90-degree corners over diagonal layouts.
Both editions agree on crafting, gate behavior, and lead anchoring, so a fence build from one edition usually works on the other without changes.
Tips and common mistakes
A few things that catch people:
- Don’t mix wood and nether brick fences in the same wall unless you want the visible gap. Hide the join with a fence gate or a full block.
- A single broken fence post in a long wall is enough for a small mob to slip through. Check pen walls for missing posts before sundown.
- If you build a fence on top of a slab, the slab counts as the fence’s foundation and the fence still works as a 2-block barrier from the mob’s perspective. But if you put a slab next to a fence on the outside, you’ve just made a step-up that some mobs can use.
- A waterlogged fence still blocks mobs the same way. If you need a pen in a flooded area, fences hold up.
Frequently asked questions
Can mobs jump over a fence?
Most mobs cannot, including zombies, skeletons, and creepers. Endermen teleport, phantoms fly over, and spiders climb most walls but specifically cannot climb fences.
Do fences burn?
Wood fences burn the same way as planks. Nether brick fence does not burn. Crimson and warped fences look like wood, but they are nether stem variants and do not catch fire.
How tall is a fence?
A fence is 1.5 blocks tall visually but counts as 2 blocks for mob pathfinding, which is why mobs can’t jump over.
Can you walk through a closed fence gate?
No. A closed fence gate blocks players and mobs the same way a fence does. Open the gate first.
Do fences connect to glass?
Yes, to full glass blocks. A fence rail draws to any solid full block face beside it, including a glass block. A glass pane is not a full block, so the rail does not draw to a pane.
Can you attach a lead to a nether brick fence?
Yes. All fences accept leads, including nether brick fence. The lead behaves the same as it would on a wood fence.
Why does my fence not connect to my neighbor’s nether brick fence?
Wood fences and nether brick fences are treated as different materials, and the connection check only joins matching families. Stick to one material per pen, or use a fence gate to bridge the two visually.
Where fences fit in your build
A fence is one of the cheapest 1.5-block-tall barriers in the game and one of the few blocks that uses a pathfinding height taller than its visual height. For penning animals or anchoring leads, fences are the right tool. If you find yourself stacking blocks on top of a fence, you’re using the wrong material; switch to a wall block and you’ll save the headache.





