Ender Dragon

The Ender Dragon is a boss mob that appears in The End, and is the first boss mob to be added to Minecraft.

Initial spawning
The ender dragon spawns naturally in the End, immediately as the first player enters the End.

Respawning
Players can re-spawn the ender dragon once the fight is completed, by placing four ender crystals atop the exit portal, one on each side.

Commands
The command, by default, summons a harmless ender dragon that hovers in place. Setting the  tag, for instance by issuing, will create a normal ender dragon, though with no health bar because unlike withers, the game will remember that the dragon was killed or respawned by crystals and decide to show or hide dragon's health bar.

Drops
Once defeated, the ender dragon will appear to have beams of light spontaneously erupting from its body. It will then explode, dropping enough experience to bring a player from no experience to level 78 (12000 - 10 drops of 1000 experience, one drop of 2000 experience). Subsequent ender dragons (ones re-spawned via the ender crystals) only drop 500 experience.

It will also activate the exit portal, and drop a dragon egg onto the top. This portal is found at X=0 and Z=0, at the Y-coordinate of the surface of the island. The dragon egg is only dropped by the first dragon, and never by subsequent dragons.

Behavior
The ender dragon will destroy any blocks it comes into contact with, except obsidian, end stone, bedrock, command blocks, barriers, iron bars, end portal blocks, end portal frames, and end gateway blocks. Instead of destroying them, the ender dragon passes through them, making the ender dragon extremely dangerous due to how it's impossible to restrict its movement. Ender Dragons makes roaring, growling and snarling noises while flying around, and make a distorted grunt sound that bears some resemblance to a Wither's hurt sounds, but with more static. The flapping of its wings can also be heard as the dragon moves from some distance away.

The ender dragon has a purple health bar that appears at the top of the player's screen. This bar indicates the remaining health of the resident ender dragon. Each End dimension houses a single ender dragon whose health is periodically healed by nearby ender crystals. Destroying an ender crystal while the ender dragon is being healed by it (indicated by a series of circles appearing between the ender crystal and the ender dragon) will cause the ender dragon to take damage.

The ender dragon takes $1/4$ normal damage when hit in any part except the head. It's also immune to arrows once landed.

Any living entities hit by the dragon's wings will be dealt damage and thrown through the air, sometimes to fatal heights or off the island. Living entities hit by the dragon's head will take damage. Neither of these effects is applied for $1/2$ second after the dragon takes damage.

The dragon has a 10-second-long breath attack that does damage (like a Lingering Potion of Harming) after the first half-second, and an exploding fireball that acts much like a Lingering Potion of Harming II. These effects are shown as particles that resemble portal particles, which can be collected with empty bottles to obtain Dragon's Breath. The dragon does not take damage from snowballs, eggs, or other attacks that normally deal no damage.

The dragon has four states: circling, strafing, charging, and landed. It begins in the circling state. When landed and cumulative damage while landed exceeds, it will take off (to start circling) and reset the accumulator. The accumulator is not reset if the dragon takes off naturally.

When circling, the dragon will circle outside the ring of pillars if ender crystals remain or inside the ring if not. With increasing chances as crystals are destroyed it will land on the empty portal or will strafe a player within 64 blocks of the portal.

When strafing, the dragon will fly towards the target player and shoot a fireball when within 64 blocks before resuming circling.

When charging, the dragon will fly rapidly towards the target player's position at the start of the charge, then resume circling whether or not the player was actually hit.

It will not target other entities except the player, but should it hit an enderman, the enderman will turn hostile towards the ender dragon. Blazes, Wolves, Iron Golems, Snow Golems, Zombie Pigmen, Silverfish, Endermites, Zombies, Skeletons, Creepers, Wither Skeletons and Withers will also turn hostile to the ender dragon. Whenever the dragon finds itself nearer than 10 blocks to is current target or more than 150 blocks away, it will choose a new target. When damaged it will target a point just behind itself, causing it to turn away and choose a new target.

To land, the dragon flies to the empty portal (approaching from the side opposite the player, if applicable) and perches on top (actually, the highest block of X=0, Z=0, regardless of that block is actually part of the empty portal). After 1.25 seconds, if a player is within 20 blocks of the portal it will roar (2 seconds) and then use its breath attack for 3 seconds, otherwise it takes off. If no player is near enough for 5 seconds, the dragon will charge at a player within 150 blocks or will take off and begin circling if no player is found. It will also take off and begin circling after the fourth consecutive breath attack. If the player attempts to use arrows on the dragon while it's landed, it'll immediately charge a random player.

If it takes fatal damage, it will fly to the vicinity of the portal before actually dying unless too far away or too near from the portal.

The dragon can be re-spawned as often as desired by placing player-made craftable ender crystals. When the dragon is re-spawned, a series of explosions reset the obsidian pillars, iron bars, and ender crystals.

The ender dragon can only take damage from explosions and player based damage.

Console Edition




In the Console Edition, the ender dragon's behavior is the same as its PC counterpart. While flying, the ender dragon fires ender charges (console edition ones come from the sky instead), which cannot be deflected, at the player (It is also aggravated by players in Creative mode and will still shoot ender charges at them). After flying for approximately 30 seconds, the ender dragon will come down and hover over the unfinished bedrock portal, and remain there for another 30 seconds. The ender dragon will spew out its ender acid which deals armor piercing damage onto nearby entities except other ender dragons (this ender acid doesn't spawn in a dragon box, but instead detects entities too close to it, then damages them with magic damage. Players may continually strike it with a weapon at this time, but like the PC version, you can get knocked far away from the ender dragon.

Like its PC counterpart, the ender dragon's portal is spawned in the middle of the island as soon as you enter the End. However, until the ender dragon is defeated, it will remain deactivated, and the dragon egg will not be on its podium. Until it has been killed, this is used by the ender dragon as a nest, where it will hover over it and attack the player with ender acid.

Two of the obsidian pillars (like PC) have iron bars surrounding the crystal. This prevents the player from shooting it from a distance with a bow, ensuring the player has to climb the pillars.

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

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

Trivia

 * Name tags cannot be put on an ender dragon.
 * The Xbox avatar item 'Ender Dragon Pet' has the description 'A cuter, friendlier version of his bigger, less playful Minecraft sister.'- revealing that the ender dragon is female.
 * The ender dragon's hitbox is larger than the ender dragon itself, causing players to be pushed away from it.
 * If you spawn the ender dragon in a world and turn the difficulty to peaceful, the dragon will stay and not disappear, but will not be able to hurt the player.
 * If you kill an ender dragon in the overworld or nether, it will not create a portal.
 * Ender dragons can push other ender dragons around.
 * In spectator mode, you 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.
 * Ender dragons can only be damaged by players and explosions. This can be noticed if a blaze or skeleton are made to shoot at the ender dragon, or exploited by detonating beds as the dragon approaches.
 * You can easily hit the ender dragon while it's on its podium if you sit in the empty portal and stand slightly behind its head. The ender dragon is unable to hit the player when they stand in this position.
 * Ender dragons can't destroy minecarts or boats by ramming.
 * If you put a block at X=0, Z=0, upper than the exit portal, the dragon will fly to it when it is landed state. If the block is too high, the game can be crashed.
 * In The End, seeing the dragon health bar with night vision effect will make your vision more purplish.

Notch-related trivia

 * The name "ender dragon" was first made known through a tweet by Notch reading "raqreqentba", which could be decoded using the ROT13 cypher, translating to "enderdragon".
 * 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?"
 * 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.
 * In terms of how difficult the ender dragon is to defeat, Notch tweeted that his design guideline for the dragon is "[If] I can beat it at all, it's too easy."
 * 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 matter.