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 often spawn on the walls of the dungeon. They don't despawn naturally, and once killed, they don't respawn.

Drops
Shulkers drop 10 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, 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.

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

When its shell is closed, a shulker has armor points and is completely 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.

If you name a shulker with a name tag named Dinnerbone or Grumm it will reveal a spiral pattern and appear to 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.

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

The shulker's projectiles have entity ID  and also have entity data which control its movement.

Trivia

 * The name shulker is a portmanteau of "Shell Lurker"
 * 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.
 * The file name of the texture of the Shulker is called endergolem.png
 * This could mean that the original Shulker was originally supposed to be a Golem.
 * The file name of the texture for the projectile shot by the Shulker is called spark.png
 * Shulkers are unaffected by the Levitation effect, and thus won't float up when hit by another Shulker.
 * 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.
 * One can make the projectile hit another shulker, resulting the two shulkers to fight. The player can use this as an advantage, as one of the shulkers will die, leaving the other one severely injured.
 * Sometimes, both of the shulkers will die, because of how slow the projectiles travel.
 * If given the invisibility effect, only the shulker's shell will turn invisible.