Ender Dragon doesn't take damage from melee attacks unless hit a certain way
When fighting the ender dragon, melee attacks sometimes don't register at all.
On the middle hitbox where the torso is ubicated, hits don't register from the center of the model towards the tail. Instead, they are only registering near the head, and only on certain weird angles. From what i've seen, the other hitboxes where the head and tail are located seem to be unaffected. Another important thing to say is that wings don't ever register hits (more info in the comments).
Basically, melee attacks done facing to the back or middle of the model don't register, seems to depend on the dragon's or player's position. Arrows however, always register.
Code Analysis
Code analysis by Insane96MCP can be found in this comment.
This issue appears to be caused by two root problems:
- There is a desync between client and server for entity IDs for the small hitboxes the dragon is composed of due to an off-by-one error (see
MC-274526) - The hit detection used by the game does not account for the fact that due to its size, the dragon entity can be located in a chunk the player is not looking at (see MC-261638, also affects other entities with large hitboxes)
2019-08-01, 05:07 PM
2024-10-30, 06:15 PM
2024-10-30, 11:02 AM
61
27
1.14.4 - 1.21
1.14.4, 1.15.2, 20w06a, 20w09a, 20w11a, 20w22a, 1.16 Pre-release 8, 1.16.2, 1.16.3, 1.16.4, 20w45a, 20w46a, 20w51a, 1.16.5, 21w08a, 21w18a, 1.17 Pre-release 3, 1.17, 1.17.1 Pre-release 1, 1.17.1, 21w38a, 21w42a, 1.18 Pre-release 1, 1.18, 1.18.1 Pre-release 1, 1.18.1, 1.18.2, 22w12a, 22w16b, 1.19 Pre-release 2, 1.19 Pre-release 4, 1.19, 1.19.2, 1.19.3 Pre-release 2, 1.19.3 Pre-release 3, 1.19.3, 1.19.4 Pre-release 3, 1.19.4, 23w18a, 1.20 Release Candidate 1, 1.20, 1.20.1, 23w31a, 23w32a, 1.20.2 Release Candidate 2, 1.20.2, 23w40a, 23w43a, 1.20.4, 23w51b, 24w05b, 24w06a, 24w07a, 24w14a, 1.20.5 Pre-Release 1, 1.20.5, 1.20.6 Release Candidate 1, 1.21