Shulker

Shulkers are box-shaped hostile mobs found in end cities. They hide in their shell to blend in with surrounding purpur blocks and guard the city's various treasures. They are the only source of shulker shells, which are used to craft shulker boxes.

Natural generation
Shulkers spawn during the generation of end cities, which are located on the outer islands of the End. They usually spawn on the walls of the city and on end ships. They do not despawn naturally, even in Peaceful difficulty.

Post-generation
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 following conditions need to be met:


 * When the shulker gets hit and then has less than half its health remaining, it can teleport without spawning a new shulker. The chance for this to happen is 25%. It uses the same process as described below. If the attempt fails, it continues with the spawn attempt.
 * The hit shulker must have its lid open.
 * The hit shulker needs to find somewhere to teleport. For this, it takes a random block in a 17×17×17 cuboid centered on the shulker and then checks if the block has a valid face to teleport to. If not it proceeds to try this up to 4 more times. If no valid face is found, the attempt fails.
 * Each other shulker within 8 blocks of the hit shulker decreases the odds of success by 20%. When five or more other shulkers are nearby, no shulkers will spawn.

If the attempt succeeds a new shulker spawns where the old shulker was before it teleported.

Drops
$$, shulkers drop 0–1 shulker shells. The maximum can be increased by 1 per level of Looting, which is 0–4 shells with Looting III.

$$, shulkers have a 50% chance of dropping a shulker shell when killed. This is increased by 6.25% per level of Looting, for a maximum of 68.75% with Looting III.

Shulkers also drop when killed by a player or a tamed wolf.

Behavior
The shell of the mob looks similar to a purpur block, blending in relatively easily to its surroundings. Inside the shell of the mob is a small yellow head with two eyes. Shulkers are uncolored by default when using spawn eggs, while white is the default when using or spawners. Spawning shulkers with other colors can be done using the command, as detailed below.

Shulkers generally remain stationary, attached to an adjacent solid block. However, if the block the shulker occupies becomes something other than air or the shulker finds itself not adjacent to any solid block, or the shell cannot open, it attempts to teleport (5 attempts per tick) to an air block within a 17×17×17 cuboid centered on the shulker that is adjacent to a solid block. If it finds no solid blocks to teleport onto (like when in the Void) it does not move.

When a shulker is spawned next to another shulker, one of them teleports away. Shulkers avoid teleporting adjacent to another shulker.

Shulkers occasionally open their shell for 1–3 seconds to peer outside. When a target comes within about 16 blocks, it opens fully and shoots guided projectiles that follow the player, moving only along the X, Y, or Z axes and leaving trails of white particles. The projectiles can be destroyed by attacking them or blocked with a shield. If the projectile hits an entity, it does of damage and inflicts the Levitation status effect for 10 seconds. (Levitation has no effect underwater, or while riding the mobs.) The shulker continues firing every 1–5.5 seconds while the target remains in range. If the shulker's target dies with projectiles still in flight, they fall to the ground.

Shulkers can attack each other, in which case they shoot fully guided bullets at each other, but are unaffected by levitation when hit. The normal teleportation habits apply during these battles.

When its shell is closed, a shulker has armor points and deflects arrows. When the shell opens, it loses this natural armor and takes damage as normal. When at less than half health, a shulker has a 25% chance of teleporting (as described above) after taking damage. When a shulker is attacked, other shulkers in the area target the attacker as well.

$$, shulkers don't take burning damage from lava or fire, but $$ they are not immune to fire damage. They drown in water, but try to teleport away when water or lava flows into the block they occupy. They do not take damage if they touch water, unlike endermen.

In Peaceful difficulty, shulkers exist within the world, but do not attack, like vindicators and evokers.

Shulkers are treated differently than true blocks. For example, mobs are unable to pathfind around or jump over them, and falling on them from a height does not produce particles. Their spawn egg also does not destroy blocks such as grass.

Shulkers can be hooked by a fishing rod. However, they cannot be reeled.

$$, they apply Levitation II instead of I.

Shulker bullet
A shulker bullet is a guided projectile that is shot from shulkers, and they follow the targeted entity along the X, Y, or Z axis and leave trails of white particles. A shulker bullet that hits a mob or player deals damage and affects them with Levitation for ten seconds.

The shulker's projectiles also have entity data that control its movement.

The bullet can be destroyed by hitting it with any item, shooting it with an arrow, or blocking it with a shield. It explodes upon contact with a block. The explosion does not destroy any blocks and does not damage nearby mobs or players.

Dyeing
Shulkers can be dyed in a similar fashion to sheep. a dye on a shulker gives it the color of the dye.

Transportation


Shulkers can be moved by boats or minecarts; pushing a boat/cart into a shulker causes it to board. A boat's sides block some of a shulkers projectiles.

A shulker pushed through the exit portal gets transported to the world spawn point in the Overworld. Since shulkers teleport when not adjacent to a solid block, they must be pushed down the central pillar of the exit portal (or a manually placed block directly above the portal) with a piston.

ID




Entity data


Shulkers have entity data associated with them that contains various properties.

Shulker bullets have entity data associated with them that contains various properties.


 * See Bedrock Edition level format/Entity format.
 * See Bedrock Edition level format/Entity format.

Trivia

 * Originally, shulkers were going to camouflage with a nearby block (shulkers next to purpur would look like purpur, and shulkers next to end stone would look like end stone). However, Jeb decided this was too difficult to code, so instead, shulkers were just purple mobs that would open and shoot.
 * The word "shulker" is a portmanteau of "shell lurker".
 * A shulker named 'Dinnerbone' or 'Grumm' flips upside-down, revealing a spiral pattern on the base. This appears to also lift the shulker by the same height as a pressure plate.
 * By using commands, they can be made to be part of a team to attack other teams and can be used as defense mobs. In that case, it doesn't attack its teammates but targets most hostile mobs without provocation.
 * Walking toward a shulker at the same level as the player's head pushes the player down to the one-block crawling position if there is space beneath.
 * If given the invisibility effect, only the shulker's shell becomes invisible. This is different to most other mobs such as armored mobs and saddled pigs, where the living part of the mob turns invisible with the outer areas remaining visible.
 * In the game's texture files, the shulker bullet is named "spark.png".
 * Gravity blocks glitch when on top of a shulker. Sand on top of an extended shulker is higher than sand on one block but the sand is solid.
 * If the shulker was initially attached to the ground and there is a block on the side and on the top, the shulker becomes attached onto the block beside.