Shulker

Shulkers are hostile mobs that are found in End cities, located on the outer islands of the End. They hide in their shell to blend in with surrounding purpur blocks.

Spawning
Shulkers spawn during generation of end cities, which are located on the outer islands of the End. They usually spawn on the walls of the city. They don't despawn naturally, and once killed, they don't respawn.

Drops
Shulkers drop 5 experience when killed by a player or a tamed wolf. Otherwise, they drop nothing.

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 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 will attempt 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 blocks to teleport onto (like when in the Void) it will "attach" to the air and not move.

Shulkers will occasionally open their shell for 1–3 seconds to peer outside. When a target comes within about 16 blocks, it will open up fully and shoot guided projectiles (which follow the player) which only move along the X, Y, or Z axes and leave trails of white particles. The projectiles can be destroyed by attacking them. If the bullet hits an entity, it does of damage and inflicts the levitation status effect for 10 seconds. As long as the target is in range, the shulker will continue to fire every 1–5.5 seconds. If the Shulker's target dies while the bullets directed at that entity still exist, they will simply fall to the ground.

When its shell is closed, a shulker has armor points and is immune to 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 will target the attacker as well.

Shulkers are immune to lava and fire.

In Peaceful mode, Shulkers will stay within the world. However, they will not attack.

Data values
Shulkers have entity data associated with them that contain various properties of the mob. Their entity ID is.

Shulker bullet
The shulker's projectiles also have entity data which control its movement.

Trivia

 * The name shulker is a portmanteau of "Shell Lurker"
 * If you use a name tag to name a Shulker 'Dinnerbone' or 'Grumm', the mob will flip upside-down, revealing a spiral pattern on the base. This appears to also lift the Shulker the same height as a pressure plate.
 * If you place an anvil on the shulker, it will lift while the shulker opens its shell and after some lifts it will drop as an item again. The same happens with a block of sand or gravel.
 * Shulkers can also begin to attack each other, in which case they will shoot fully guided missiles at each other, but will not be affected by levitation when hit. The normal teleportation habits apply during shulker vs. shulker battles.
 * One can use this to their advantage, as this would cause the Shulkers to ignore the player and make them easier to take out.
 * 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 won't attack its teammates, but will target most hostile mobs without provocation.
 * Shulkers are slightly smaller than a full-sized block.
 * When standing on a shulker's shell, you can sneak and will not fall off, like with other blocks. If the shell is opened sideways, this can simulate a vertical slab, which you can still stand and sneak on without falling. If it closes its shell while a player or mob is on, they will fall off.
 * If given the invisibility effect, only the shulker's shell will turn invisible.