Ender Dragon

The ender dragon is a versatile, flying boss mob found when first entering the End. She is the first boss added to Minecraft.

Initial spawning
The ender dragon spawns naturally in the End when the first player enters the dimension, and she spawns on any difficulty. In Peaceful, she still fires damaging fireballs, but her body does no damage.

Re-summoning
Players can re-summon the ender dragon once the fight is over by placing four end crystals on the edges of the exit portal&emdash;one on each side. (Fewer crystals can be used by exploiting this trick.) When the dragon is re-summoned, a series of explosions resets the obsidian pillars, iron bars, and end crystals.

Commands
The command, by default, summons a harmless ender dragon that hovers in place. Setting the  tag (by issuing either the  or the  commands) starts the ender dragon's ordinary behavior, although there can still be no health bar, since it's managed by the End's dragon fight status rather than by the dragon entity itself. If spawned away from the center of the map (X:0, Z:0), she flies to the center then resumes normal behavior (see ).

Drops
Once slain, the ender dragon slowly ascends, her wings and body becoming more tattered until she wilts into nothingness, while beams of light erupt from her center. There's an explosion of 12,000 experience points (ten drops of 960 and one drop of 2400)&emdash;enough to bring a player from level 0 to level 78. In subsequent completions of the ender dragon fight (after she's re-summoned via the End crystals), only 500 experience points are dropped.

After the dragon is slain for the first time only, her egg warps in above her nest. The nest fills in with an End portal interface to become the exit portal, enabling the player to transport back to the Overworld to wake up in their bed.

Every completed dragon fight also creates an End gateway portal floating within 75-100 blocks of the exit portal, up to a maximum of 20 portals.

Behavior


The ender dragon has four main states of behavior:


 * Circling
 * The dragon begins in this state. She circles the ring of obsidian pillars on either the outside if there are still End crystals or the inside if the crystals are destroyed.
 * With each crystal's destruction, there's an increased chance of the dragon switching states.
 * Targeting
 * Whenever the dragon finds herself less than 10 blocks or greater than 150 blocks from her current target, she attempts to choose a new target. When damaged it will target a point just behind itself, causing it to turn away and choose a new target.


 * Strafing
 * Upon the destruction of an End crystal, the dragon immediately switches to this state to fire a fireball at them.
 * The dragon targets a player within 64 blocks of her nest. As soon as she's flying within 64 blocks, she fires a fireball at the player.
 * The dragon resumes circling after this state.


 * Diving
 * The dragon dives onto the target player's position, taken at the start of the dive.
 * The dragon resumes circling after this state, whether or not she actually hit the player.


 * Perching
 * The dragon flies to her nest (approaching from the side opposite the player if possible) and lands on the highest block of (X:0,Z:0). The dragon is immune to arrows in this state (They all catch fire and bounce off).
 * Dragon's Breath
 * After 1.25 seconds, if a player is within 20 blocks of the nest, the dragon roars and use her 3-second breath attack, damaging players similarly to a lingering Potion of Harming.
 * The purple clouds emitted from the dragon's breath attack can be collected in an empty bottle to obtain dragon's breath.
 * Charge
 * If player is not near the portal within 5 seconds of her landing, she charges at a player within 150 blocks.
 * Take-Off
 * After four consecutive breath attacks, or if the dragon fails to locate a player within 150 blocks, she takes off from her perch.
 * The dragon resumes circling after this state.
 * Escape
 * If cumulative damage taken while perched exceeds, she takes off and resets the damage accumulator. The accumulator is not reset if she does not take enough damage.
 * The dragon resumes circling after this state.

The dragon never targets any entity but the player. Other mobs may turn hostile to the dragon when struck. Any entities hit by her wings are dealt damage (or  damage if hit by her head) and are thrown into the air, sometimes to fatal heights or even off the island. Neither of these effects are applied for $1/2$ second after the dragon takes damage.

When the dragon finally takes a fatal blow, she flies towards her nest before dying, unless she can't find it within 150 blocks, or it's inside blocks.

The dragon can pass through all blocks, destroying almost all types. Blocks not destroyed are those that naturally generate on the central End island and those that are intended to be indestructible:


 * Command Block
 * End portal (block)
 * End gateway (block)
 * Command Block
 * End portal (block)
 * End gateway (block)
 * End portal (block)
 * End gateway (block)
 * End gateway (block)



The ender dragon has a light purple health bar that appears at the top of the player's screen. Her health is frequently restored by nearby End crystals, indicated by a magical white beam connecting the dragon and the crystal. Destroying an End crystal that's actively healing the dragon causes damage to her. The dragon can only take damage from explosions and player based damage. The dragon takes $1/4$ normal damage when hit in any part that is not its head. Suffocation is completely non-applicable, as she either phases through or immediately destroys any block she touches.

By using the shortcut, the dragon's bounding box appears. She cannot be damaged at just any spot in this large volume: Eight green sub-hitboxes are also shown, which indicate the locations where she can take damage: The tail, body, head and wings.

The dragon is immune to all status effects, such as poison and even "instant" effects like instant damage.

Dragon Fireball
Dragon fireballs are special fireballs that the ender dragon fires while strafing. They cannot be deflected like ghast fireballs, and they do no impact damage. Instead they deposit purple clouds across the ground, similar to a lingering Potion of Harming II. As with her close-ranged breath attack, the purple fog can be bottled to obtain the dragon's breath. In the Console Edition, dragon fireballs come from the sky rather than the dragon herself.

Fireballs fired by ender dragons also have entity data associated with them that define various properties of the entity.

Data values
The ender dragon has entity data containing various entity properties.



Trivia

 * Name tags cannot be used on an ender dragon.
 * The ender dragon's hitbox is larger than the ender dragon itself, causing players to be pushed away from it.
 * If the player kills a summoned dragon in the Overworld or Nether, it will not create a portal, nor an egg.
 * In Spectator mode, the player cannot view the perspective of the ender dragon, unlike any other mob.
 * Using F3+B to show hitboxes reveals that the ender dragon's head rotation faces in the opposite direction to that which its real head faces. This is also why the ender dragon faces the wrong way when set in a monster spawner.
 * When ender dragon is spawned in the Overworld, it will fly to coordinates x=0 and z=0 and dive at the ground.

Notch-related

 * On Reddit, Notch referred to the ender dragon as a she, and suggested her name to be "Jean?" in the same manner he called the Player "Steve?".
 * Dinnerbone later stated that he thinks the name is officially "Jean?"
 * The Xbox avatar item 'Ender Dragon Pet' has the description 'A cuter, friendlier version of his bigger, less playful Minecraft sister.'- confirming that the ender dragon is female.
 * Before it was textured, Notch reported that he was afraid to texture it as it was a complicated model. In the end, the dragon model was so complex Notch stated that he gave up making the texture manually and wrote a texture packer tool to aid him in adding the texture to the model. Notch also uploaded the code for the tool so others could use the pack.
 * Notch joked about how Minecraft was "going next gen" when deadmau5 mentioned this.
 * Notch has uploaded a video showing why ender dragons will not spawn in the main world, as they would destroy any block they come into contact with.
 * On Reddit, Notch explained why ender dragons destroy overworld matter and phase through ender matter.