Spawned a new dragon? Wanna learn how to ride it? Well here you go! A tutorial of how to ride the ender dragon! One of Minecraft's most famous questions ANSWERED!
First grab the following materials:
(As a theme, we will be building in the end.)
Next, Place down 1 command block, and right-click it so we can enter the command.
Then, type in the following command into the block:
1.13 and up
execute at @e[type=minecraft:ender_dragon] run tp @e[type=minecart] ~ ~5 ~
1.12 and lower
execute @e[type=Minecraft:ender_dragon] ~ ~ ~ tp @e[type=minecart] ~ ~5 ~
Make sure the block is at repeated and always active.
Finally, place down a rail somewhere near the command block and place a minecart on the rail. It should disappear, teleporting above the ender dragon.
Note: This will not work unless the ender dragon and minecart are in range of the command block placed.
Additional Note: On Pocket Edition/Windows 10, I encountered a bug where the ender dragon became invisible when using this trick. I do not know If the bug is still intact.