The bug
When I summon an ender dragon with this command:
/summon minecraft:ender_dragon ~ ~ ~ {CustomName:"{\"text\":\"Dinnerbone\"}",CustomNameVisible:1b,Silent:1b,NoAI:1b}
the ender dragon is not upside down, so I tried to see if anything was wrong with my command and tried it with a sheep.
/summon minecraft:sheep ~ ~ ~ {CustomName:"{\"text\":\"Dinnerbone\"}",CustomNameVisible:1b,Silent:1b,NoAI:1b}
It did work as the sheep was turned upside down.
I don't know if this is intentional or not, but I hope it's not.
Code analysis
Based on 1.12.2 MCP names.
In the method net.minecraft.client.renderer.entity.RenderDragon.applyRotations()
where it applies the dragon's model rotations, it does not have a check if the dragon is named Dinnerbone or Grumm and to rotate if so. To fix this issue, this piece of code can be added at the end of the method applyRotations()
.
String s = TextFormatting.getTextWithoutFormattingCodes(entityLiving.getName());
if (s != null && ("Dinnerbone".equals(s) || "Grumm".equals(s)))
{
GlStateManager.translate(0.0F, entityLiving.height + 0.1F, 0.0F);
GlStateManager.rotate(180.0F, 0.0F, 0.0F, 1.0F);
}
Linked issues
relates to 2
Attachments
Comments 16
Confirmed for 1.13.1 and the command should be update to:
/summon minecraft:ender_dragon ~ ~ ~ {CustomName:"{\"text\":\"Dinnerbone\"}",CustomNameVisible:1b,Silent:1b,NoAI:1b}
I'm not speaking on behalf of Mojang here, but I'm guessing it's because the ender dragon has a complex hitbox compared to most entities (look at it with F3+B). With most entities, the bounding box can work the same if the entity is flipped or not. With the ender dragon, they'd need to flip the sub-entities as well so that the bounding boxes are in the right place, which adds a fair bit of complexity, maybe too much for an easter egg feature. (Again, this is just my guess, though.)
Related to MC-115092 but likely intended or "Won't fix" since the ender dragon consists out of multiple parts and just having them render upside-down would likely look pretty incorrect.