Tutorials/Shulker farming

Shulker farming is the process of using the 1.17 mechanic where if a shulker is hit by a shulker bullet, there is a chance for a new shulker to form, allowing a renewable source of s.

Mechanics
There is a chance that a new shulker of the same color will spawn when one shulker hits another shulker (or itself) with a shulker bullet. The hit shulker must have its lid open to spawn a new shulker. The shulker spawns where the old shulker was before it teleported. The chance of this happening decreases with the amount of shulkers in an 8-block radius; when more than 5 shulkers are present in the area, no shulkers will spawn. The probability is reduced for shulkers with less than half their health remaining.

There are two main approaches to shulker farming, cell-based designs, and reactors. Cell based designs maintain a shulker in a breeding cell, removing the duplicated shulkers from around the breeding cell as quickly as possible. On the other hand, reactors rely on having a large number of effective breeding cells, and just let the number of shulkers naturally saturate, collecting drops from within the reactor as shulkers gradualy die off. Both designs have their strengths and weaknesses, with reactors tending to be a lot simpler, but being larger, and usually requiring significantly more blocks placed for the same rates. In both cases, these farms are reliant on having a large number of teleportable spaces for the breeding shulker(s). However cell-based farms also need a way of moving shulkers away from the region around the breeding shulker.

Another key consideration is 2-dimension (2D) versus single dimension (1D) farms. 2D farms make use of portals, which are a highly effective way of removing shulkers from the region around the breeding shulker, and also provide for a large number of teleportable spaces (with relatively few blocks). However, 2D farms can only be built in the overworld, meaning a shulker has to be transported from the end through the main portal gateway. Additionally, portal-based farms can often be unsuitable for busy servers, and diagnosing portal-linking issues can be a headache for less technical or less experienced players.

On the other hand, 1D farms tend to be slightly more complicated and have lower rates (although this is changing with newer 1D farm designs). Early iterations made use of a few different methods of removing shulkers, such as minecarts, and trapdoors, however more recently, an interesting interaction between shulker teleporting and scaffolding has been discovered, making a variety of new farms possible.

Shulker Teleporting Mechanics
When a shulker tries to teleport (including when it is hit by a shulker bullet) it will try up to 5 random locations in a 17x17x17 region around itself and test if they are valid spots for it to sit on. For a spot to be valid, it needs to be an air block, have a solid face for a shulker to sit on, and have a collisionless block opposite the solid face for the shulker to extend its head into.

Since duplicating requires the shulker to successfully teleport, ensuring an abundance of valid teleport targets arond the shulker (or shulkers in the case of a reactor) is usually important to ensure good rates. Though, since the shulker tries multiple times per teleport attempt, there are diminishing returns

Most farms also require teleport-proofing parts of the farm to ensure shulkers can't end up where they shouldn't. For this there are a number of blocks with some solid surfaces, but not others, which includes slabs, stairs, trapdoors, and soul sand (which is only solid on the base due to not being a full block).

Scaffolding Interaction
Scaffolding's collision box changes depending on where you view it from. From above, scaffolding acts like a top slab, while from below it acts like an empty block. From the same level, unsupported scaffolding acts like a bottlom slab, however supported scaffolding appears empty.

When shulkers attempt to teleport, they use their current location to determining the scaffolding collision box test the validity of a particular spot. This means that there are certain setups that the shulkers can only teleport to from certain locations. Furthermore, since the relative position of the shulker changes after teleporting, the new location can suddenly appear invalid, and the shulker will immediately attempt to teleport away.

In particular, placing a solid block (or any block with a solid bottom surface) one block above scaffolding creates a location which shulkers can only teleport to from below, but whch appears as an invalid spot after the shulker has teleported to it. This can be used to transport shulkers upwards, and is especially useful for remving shulkers from the region around the breeding shulker, making a number of farm designs possible.

Moving Shulkers to the Overworld
The Core Mechanism is Make Shulkers teleport to End Portal.

Making shulkers ride Minecarts
If a minecart is next to a shulker, then the shulker will ride the minecart.

So, you can move Shulkers near the end portal, but because the shulker is riding a minecart, it won't teleport to the Overworld. So, use an activator rail.

Making shulkers teleport to End Portal
If you cover all the blocks a shulker can teleport to except the block you want it to teleport to with a Button, it is possible to make shulkers teleport to specified position.