Tutorials/Wither cage

What I think I may have forgot to save all the important things :( - Editor 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

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

= Classification =

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 sulvival 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.

== Wither cages without "unbreakable" blocks

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. Such cages always contain 7 parts each:

1. Wither:
By definition, every wither cage contains at least one Wither. When

2. Main Head Target:
The main head target is the target of the main head of the wither. The main head of the wither will target the mob closest to the wither, upon summoning and reloading. The wither tries to fly roughly 6 blocks above the main head target.(This needs to be more exact) If the wither can see the main head target, it will shoot black wither skulls at it. According to the minecraft wiki, the main head of the wither has a 0.1% chance of shooting blue wither skulls instead. (This needs to be verified) To prevent the wither from shooting these blue skulls, there are usually blocks between the main head target and the wither, to prevent the wither from seeing the main head target, and therefore preventing him from trying to shoot at the main head target.

The reason a main head target is included in the wither cage is, that if there was no main head target, the first entity coming into the follow range of the wither would become the main head target. The wither would try to fly above this new main head target, which would probably be outside of the definite location, the wither is supposed to be in.

Therefore there is an entity included in the wither cage, which is so close to the wither, that the wither will always pick it as his main head target upon reloading, but which the wither cannot see.

3. 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, we need another entity, the wither tries to shoot at, to prevent him from shooting blue wither skulls. Therefore we have an entity called the side head target. Since the main head of the wither is targeting the main head target, only the side heads will try to shoot at the side head target. The side heads of the wither do not have a 0.1% chance of shooting blue wither skulls, they only shoot black wither skulls at their target.

The wither must be able to see the side head target, so it tries to shoot black wither skulls at it, but it must be unable to actually hit it with the black wither skulls, since the side head target will die otherwise. This is often the most difficult part of a wither cage.

The reason it is possible for the wither to see a target, without the side heads being able to shoot it, is that whether a wither sees something depends on whether there is a line of sight from the main head of the wither to the target. So if the main head of the wither can see the side head target, the side heads of the wither will try to shoot at the side head target, even if there is no line of sight from the side heads to the side head target.

Therefore the side head target must be visible for the main head target, but invisible for the side heads. This will cause the side heads to constantly try to shoot at the side head target, without ever actually managing it.

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.

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

Skull based blockbreaking mechanism
Skull based blockbreaking mechanisms use the black wither skulls the wither constantly shoots at his side-head targets to destroy blocks.

Pros : Cons :
 * Simple to make
 * 100% automatic
 * Can only break blocks with low explosion resistance (can't break cobble or obsidian), unless some elaborate tricks are used.

Damage based blockbreaking mechanism
These wither cages rely on the fact, that withers will destroy blocks in a 3x3x4 area centered around 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:

Damage by Dispenser projectiles:
Pros : Cons :
 * 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).
 * 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.

Pros : Cons :
 * 100% automatic
 * More complicated than the two others

Please note, that any kind of damage, the wither is not immune to, can be used in damage based blockbreaking mechanisms. The two methods mentioned are however the most practical ones.

Alternative Wither Cage Desings
If bedrock is available, a simple much more stable wither cage can be made, if the side heads of the wither are put inside bedrock blocks.

Since wither skulls will despawn instantly in the void, it is also possible to make a very simple and stable wither cages at the top of the world. If the heads of the wither are above y=256 they will not be able to shoot anything anymore.