Ender Dragon

The Ender Dragon is a boss mob that appears in The End.

Spawning
The ender dragon only spawns in the End. It does not have a spawn egg, and thus can be spawned only through commands or natural generation.

As of 15w31a, you can respawn the dragon by drawing a Creeper face with clay. This is temporary.

Drops
Once killed, 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).

It will also spawn an exit portal with a dragon egg on top. This portal appears at Y=64 at the X and Z location where the dragon died.

Behavior
The ender dragon will destroy any blocks it comes into contact with, except obsidian, end stone, bedrock, command blocks and barriers. Instead of destroying them, the ender dragon passes through them. When hit, an Ender Dragon makes roaring, growling and snarling noises. The flapping of its wings can also be heard as the dragon moves. Unlike endermen, ender dragons don't take damage from water, nor do they teleport.

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 flies around, randomly flying at players or arbitrary points above the End island. Specifically, It will not target other mobs, but should it hit an enderman, the enderman will turn hostile towards the ender dragon. Blazes, wolves, and zombie pigmen 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.
 * If any non-spectator players are in the End, 50% chance of targeting one player at random.
 * Otherwise, target a random point (at least 10 blocks away from the dragon's current position) in a 120×120×50 cuboid centered on 0,95,0.

Any living entities hit by the dragon's wings will be 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 ender dragon takes $1/4$ normal damage + 1 when hit in any part except the head. Therefore eggs, snowballs, and other attacks that normally deal no damage will deal damage to the ender dragon when not hitting it in the head.

Console Edition
In the Console Edition, the ender dragon's behavior is slightly different. While flying, the ender dragon fires ender charges, which cannot be deflected, at the player. 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 "Ender acid", which deals damage, onto nearby players. Players may continually strike it with a weapon at this time. The Ender Dragon also fights endermen during this time, implying the reason for returning to the "nest" is to stop the growing clusters of endermen from stealing the egg.

Also, instead of the portal being spawned underneath the Ender Dragon's death, it 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".

Unlike the PC version, the ender dragon cannot go through bedrock or obsidian. Also, two of the obsidian pillars 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.

It is also aggravated in Creative mode and still shoots ender charges at the player. The ender dragon is immune to fire, lava, all enchantments except Sharpness or Power, splash potions, Cacti, TNT, and wither skulls, but only take damage from swords and bows, in all editions.

Upcoming
In 1.9, there were major changes to the ender dragon fight, which make it similar to the one on console edition, but a step further. The dragon can be respawned as often as desired (currently by drawing a creeper face with clay, although it's planned to later be done by placing player-made craftable ender crystals), but subsequent dragons don't drop XP or place a dragon egg.

The dragon continues to do damage to entities hit by the head or neck, and now also does  damage to entities hit by the wings. The dragon now also has a 3-second-long breath attack that does magic damage at a rate of per tick after the first half-second, and an exploding fireball that does up to  of armor-bypassing "dragon breath" damage to entities near the impact point.

The dragon has four states: circling, strafing, charging, and landed. It begins in the circling state. If it's not landed and takes fatal damage, it's health is set to and it lands. 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.

To land, the dragon flies to the empty portal (approaching from the side opposite the player, if applicable) and perches on top. 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. 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.

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 a spawned Ender dragon in the overworld, it will create a portal to the real End, where there will be a separate Ender dragon.
 * Ender dragons can push other Ender dragons around.
 * Ender dragons will attempt to attack players in creative mode, though this has no effect.
 * When spawned in the overworld using the command, players in creative mode at a certain height force Ender Dragons to flap their wings wildly.
 * In spectator mode, you cannot view the perspective of the Ender Dragon, unlike any other mob.

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?"
 * Notch joked about how Minecraft was "going next gen" when deadmau5 mentioned this.
 * 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.
 * 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.