Tutorials/Wither cage

A wither cage is a contraption, that keeps a wither in a definite location for an unlimited amount of time. Wither cages have the ability to automatically break blocks, thus making many things possible such as AFK tree farm, fully automatic cobblestone farm, quarries and obsidian farm... etc.

When designing a wither cage it is important to press F3+B to open the debug hitbox interface.

This article only covers vanilla survival. Creating a creative-only wither cage in creative is as simple as placing a few bedrock blocks.

Wither cage with "unbreakable" blocks
See also: Tutorials/Breaking bedrock.

These wither cages are the safest of all. However while all the safeness can be unnecessary, these designs are extremely tedious to build in survival and have absolutely no chance to become mobile wither cages.

A demonstration of a "unbreakable" blocks wither cage:

It is recommended that you don't use this unless a stable wither cage without "unbreakable" block is impossible in your version or server.

Stable:
A stable wither cage without "unbreakable" blocks is usually so stable that even if players touch the wither, it wouldn't even target them.

A stable wither cage without "unbreakable" blocks is near-impossible in Pocket Edition if not impossible as all known Head Locks have proven ineffective, and PE withers have a tendency to fly randomly around their targets.

See the Video sections for examples.

Such cages always contain 7 parts each:

Wither:
By definition, every wither cage contains at least one Wither. While designing a wither cage without "unbreakable" blocks, it is important to note that:


 * The wither only targets non-undead mobs.
 * The actual collision box of the wither is 0.5 block shorter than the debug hitbox.
 * The main head is the only part of the wither that can suffocate.
 * The wither will break a 3,4,3(x,y,z) blocks region centered in the center of the debug hitbox when damaged or hit with both damaging and undamaging projectiles.
 * Water is effective in stopping the initial explosion of the wither from destroying blocks but not entities.

Main Head Target:
The Main Head Target in a wither cage is used to stop the wither from intentionally firing blue wither skulls.

The main head of the wither will target the closest non-undead mob to the wither in-range if it previously has no target, notably right after summoning and charging up, regardless whether or not the wither actually sees it.

If the wither can see the Main Head Target, it will try to shoot wither skulls at it. On Normal and Hard difficulty, the main head of the wither has a 0.1% chance of shooting extremely destructive blue wither skulls instead of the much weaker black wither skull.

The wither will try to hover roughly 6 blocks above its Main Head Target. However if the lock mechanisms are stable enough this should not be a problem.

Thus, in a wither cage the Main Head Target must be in a position so close to the wither, but the wither can not see, and must be non-undead.

Side Head Target:
If a wither does not try to shoot at anything, it will start shooting blue wither skulls in random directions after a random amount of time.

Since the wither does not try to shoot at its Main Head Target, a Side Head Target is required that the wither can see, and tries to shoot at, to prevent it from firing these skulls.

As the main head of the wither is focusing on its own target, only the side heads which only shoot black skulls will shoot at the Side Head Target.

The wither must be unable to actually hit the Side Head Target with the black wither skulls, since the it will die otherwise. This is often the most difficult part of a wither cage, see the Fortification section for more info on how to do this.

Wither cages can also contain multiple Side Head Targets per wither.

Iron Golems are most commonly used as Side Head Targets in wither cages. This however is purely conventional and has no actual reason.

Fortification:
The reason it is possible for the wither to see a target, without the side heads being able to shoot it, is that whether any heads try to shoot something depends on whether the main head can see it or not. Additionally, the wither thinks its skulls have no hitboxes, which is incorrect and further prevents the side heads from shooting correctly.

The Fortification in a wither cage is used to block the side heads from shooting the Side Head Target while still letting the main head sees it.

It can be made from any blocks that have moderate blast resistance such as cobblestone. Some are made from indestructible ender crystals but this is unnecessary except if you want to stop the blue skulls of the main head to some extend, or to damage the wither easier.

Head Lock:
In a wither cage, Head Lock is a mechanism that suspends the wither to the ground. It can be made from either blocks or entities.

If it is made from entities, the entities have to have a solid collision box to prevent the wither from outright no-clipping through it.

If it is made from blocks, the blocks must have collision boxes that extend downward 0.5 blocks to suspend the wither while preventing it from breaking those blocks.

Wither cage Head Lock variations comparison:
1. Entities:
 * Boats:
 * Pros:
 * Tested and worked.
 * Really cheap.
 * Cons:
 * Can be destroyed by the initial explosion even with water, very rarely the subsequent explosions.
 * Can be pushed around, may end up falling from the wither.
 * Needs temporary fortification.


 * Shulkers:
 * Pros:
 * Can not be pushed around.
 * Cons:
 * Untested, not sure if possible.
 * Can be destroyed by the initial explosion even with water, very rarely the subsequent explosions.
 * The shulkers randomly opening can mess things up.
 * Can be targeted by the wither.
 * Hard to get.

2. Blocks:
 * Shulker box (opened):
 * Pros:
 * Tested and worked.
 * Can't be destroyed by the initial explosion with water and the subsequent explosions.
 * Cons:
 * Very expensive.
 * While it can be opened forever, it's actually a glitch, and the box may close if the chunk it is in is unloaded. See the Video section for more info.
 * Can't be moved by pistons.

Ground Lock
In a wither cage, Ground Lock is a mechanism which prevents the wither from moving around while being suspended by the Head Lock.

It consists of one or more "ground" blocks the wither can "stand" on while being suspended, and blocks with the hitboxes extending 0.5 block upward(so that it can hold the wither without getting destroyed) or entities with solid collision box surrounding it.

All known blocks and entities that can be used for Head Locks can be used as the surrounding blocks and entities of Ground Lock, but with a very good addition of Cobblestone Walls. They are the only blocks known to have been used in ground locks in wither cages on YouTube.

Temporary Fortification
Temporary Fortification is a temporary component used in the setup of a wither cage. They have 4 uses:


 * 1) Keeping gravity-affected Head Locks in the right position until the wither is charged.
 * 2) Keeping Head Locks that are made from entities from being destroyed by the initial explosion.
 * 3) Keeping blocks in the wither cage safe from the initial explosion using the water included.
 * 4) Keeping the wither from flowing out the cage due to the included water.

Temporary Fortification in a wither cage must be destroyed as soon as the charging phase is complete, or else it may stop the wither from seeing its Side Head Target.

A simple design that also helps boats is a water block in the place that the main wither head would be in, a slab on top(put boats here) and solid or half-slab blocks surrounding the water. It is recommended to only use 1 half-slab block for the surrounding blocks to ease water placement and reduce the damage inflicted on the boat.

Unstable:
An unstable wither cage without "unbreakable" blocks is like the stable version, but is missing any of the parts listed above except for the wither(of course). See the Video section for examples.

Static or Mobile
A mobile wither cage obviously means a movable wither cage, while a static wither cage is an inert cage.

Either the static or mobile version can also have no "unbreakable" blocks, be stable or unstable. However wither cages with "unbreakable" blocks can only be static.

See the Video section for examples.

Block breaking mechanisms
Most wither cages are built to automatically break blocks. Block breaking can be accomplished using the following methods:

Black skull based block breaking mechanism
Skull based block breaking mechanism uses the black wither skulls the wither constantly shoots at its Side Head Target to destroy blocks.


 * Pros:
 * Simple to make
 * 100% automatic
 * Cons:
 * Can only break blocks with low blast resistance (can't break cobblestone or obsidian).

Black skull + Moving blocks based block breaking mechanism
This is similar to the method above, however it uses the fact that while being moved by pistons, blocks have a blast resistance of 0, while still be able to drop.


 * Pros:
 * Quite simple to make.
 * 100% automatic.
 * Can break all blocks that can be moved by piston.
 * Cons:
 * Can not break unmovable blocks like obsidian.

Damage and projectiles based block breaking mechanism
These wither cages rely on the fact, that withers will destroy blocks in a 3,4,3(x,y,z) region centered in the hitbox of the wither, whenever the wither takes damage.

This has the advantage that even unmovable blocks, like obsidian can be broken.

There are different methods to inflict damage to a wither in a wither cage:

Using dispenser projectiles:

 * Pros:
 * Simple to make (simply add a dispenser of snowballs to a skull based cage. It is also possible to make wither cages with other projectiles, like arrows, but these are slightly more complicated, because the wither will be knocked back by arrows, which doesn´t happen with snowballs).
 * Cons:
 * Requires an additional farm, to keep the dispenser filled with, for example arrows.

Damage through suffocation:
Suffocation based wither cages use suffocation damage to force the wither to break blocks. If the wither is suffocated for more than 1 game tick, it can occasionally shoot blue wither skulls. Therefore suffocation based damage systems must suffocate the wither for exactly 1 game tick and not more. This can be accomplished by suffocating the wither in a gravity affected block, which will fall down instantly after suffocating the wither, or using a piston machine.


 * Pros:
 * Infinity automatic.
 * Cons:
 * More complicated than the three others.

Using mob projectiles

 * Pros:
 * Most compact to make: the hitting mob can be one of the Side Head Targets such as a snow golem.
 * Infinity automatic.
 * Cons:
 * A snow golem can start melting in hot biomes, however if other mobs are used things may get harder.
 * Very hard to make.
 * Snow golems are really inaccurate.

Using indestructible ender crystals as fortification
By putting these crystals at the side heads, the wither will shoot itself, damaging it.


 * Pros:
 * Very safe.
 * Very simple.
 * Cons:
 * Expensive and hard to get.