mojira.dev
MC-158205

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 @unknown can be found in this comment.

This issue appears to be caused by two root problems:

  1. 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)

  2. 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)

Linked issues

Attachments

Comments 35

this is intended the dragon will not be able to take damage for part of the landing stage of the fight

Try to get underneath it

Can confirm. The hitbox is buggy and weird. This also happens even when the dragon is not on the nest. Trying to fight it with a sword (for example by chasing it with elytra) is almost impossible as the hits don't register correctly. When you hit the dragon, the weapon makes a sound and you can see particles if the weapon is enchanted (see pictures), but no damage is dealt. I've seen videos where people were very frustrated by this, as it feels inconsistent and buggy when compared to how hits normally work. 

gaspoweredpick

Confirmed. The ender dragon isn't taking damage from places it did before.

Not to mention the way the dragon descends to the fountain is bugged

25 more comments

This is also a parity issue with Bedrock Edition (also can confirm in the latest versions).

Confirmed in 1.20.5 pre1

{*}{*}Can confirm in 1.20.6-rc1

I've added a brief summary of the findings by @unknown and from MC-274526 to the description.

The second issue with the raycast not working properly does not only affect the ender dragon but large mobs in general. With the recently added scale attribute, it is easily reproducible with other mobs too. I'll file a separate bug report about this for that reason. This has already been reported here: MC-261638.

Relates to MC-271337, both issues appeared first in 19w08b.

Ric

syarumi

Shugoh

Confirmed

Platform

Important

Combat, Entities, Hitboxes

1.14.4, 1.15.2, 20w06a, 20w09a, 20w11a, ..., 24w14a, 1.20.5 Pre-Release 1, 1.20.5, 1.20.6 Release Candidate 1, 1.21

24w44a

Retrieved