Ender dragons' rotation value and visual rotation do not match, it is visually rotated 180 degrees.
Steps to reproduce:
Spawn an ender dragon.
/summon ender_dragon
Option 1:
Run the following command in a repeating command block:
/execute at @p as @e[type=ender_dragon] run tp @s ^ ^ ^20 facing ^ ^ ^-20
Observe the dragon faces away from you.
Option 2:
Run the following command in a repeating command block:
/execute as @p at @e[type=ender_dragon] positioned ^ ^ ^10 facing entity @e[type=ender_dragon,limit=1] feet run tp @s ~ ~ ~
Observe you're put behind the dragon
Option 3:
Run the following command in a repeating command block:
/execute as @p at @e[type=ender_dragon] run tp @s ~ ~ ~ ~ ~
Observe you're facing the opposite direction from the dragon at all times.
The dragon faces the exact opposite direction, being visually rotated 180 degrees compared to the rotation value; this messes up commands which use the local coordinates.
Linked issues
is duplicated by 2
relates to 3
Attachments
Comments 9
Can confirm in 1.18.2 and 1.19-rc2; the ender dragon's facing is rotated 180 degrees, this can also be seen when enabling hitboxes.
Confirmed for 1.19.2; requesting this report get rewritten:
Summary: Ender dragons visually face the opposite direction from their rotation value
Description:
Ender dragon's rotation value and visual rotation do not match, it is visually rotated 180 degrees.
Steps to reproduce:
Summon:
Enable hitboxed (F3+B).
Use the command
/summon ender_dragon ~ ~ ~ {NoAI:1b,Rotation:[0f,0f]}
Observe which way the dragon faces, and compare it to the line of sight (blue line).
Do step 2 and 3 again, but with different rotation values.
Teleport:
Use the command
/summon ender_dragon ~ ~ ~ {NoAI:1b,Tags:["teleport_dragon"]}
Move away from the dragon.
Use the command
/execute as @e[tag=teleport_dragon] at @s run teleport @s ~ ~ ~ facing entity @p feet
Observe the dragon's facing direction.
Expected result:
The dragon would face the direction provided (summon)/face you (teleport).
Actual result:
The dragon faces the exact opposite direction, being visually rotated 180 degrees compared to the rotation value.
Another way to reproduce:
Enter spectator mode.
Run the command below.
/spectate @e[type=ender_dragon,limit=1]
Press F5 to enter third person view.
Observe which way you face compared to the dragon.
This issue also affects bedrock editions, I've created MCPE-168109 to describe the issue there.
Confirmed for 1.20.1 and 1.20.2-pre3, requesting ownership as reporter has done nothing on mojira aside from making this report; never maintained it.
Can confirm.