The diving behavior of the Ender Dragon when perching onto the portal was broken by the fixes of MC-87942 and MC-91858. Previously, the Ender Dragon would dive down to the portal while spitting acid. Due to the AI issues caused by the fix of the aforementioned two bugs, the Ender Dragon does not correctly dive downwards when flying towards the portal, causing it to make repeated attempts to fly to the center, flopping back and forth while slowly descending.
Relates to MC-271337
Note that this is not a duplicate of MC-197201, that report is refering to the divebomb attack that was removed upon 1.9's rework of the Ender Dragon. This report is instead about the Ender Dragon's perching behavior that was broken in 19w08b.
Linked issues
relates to 3
Attachments
Comments 14
The aforementioned bugs were purely visual/rendering bugs that despite being related to the Ender Dragon, and don't seem to have anything to do with dragon AI, so it's likely they were unrelated. I think that the bug might have been introduced by an internal rewrite of some sort.
@Jukitsu the fix of those two bugs specifically caused a new bug to appear in successive versions, where the dragon's animation/hitbox/behavior were all broken. That animation issues from that second bug introduced in 19w08b were addressed at MC-144612, however the hitbox/behavior issues have been left in the game to this day, leading to MC-271336, MC-271337, and MC-158205.
My early very surface-level testing seems to suggest that this may be due to an issue on how the Ender Dragon dives in general, it seems to struggle to get the proper vertical velocity when flying to a target, thus making unnecessary turns back and forth and perching too high
@PotholedSea40 While it is true that this version caused a lot of buggy behavior from the dragon, I don't think it is related to the fix of the bug. My best guess is that in the process of fixing the bug they also overhauled other parts of dragon code, breaking its AI in the process.
Also, I think I've found the issue. It seems comically stupid, but the ender dragon seems to (roughly) get a tenth of the vertical velocity it supposed to have while flying. At least, that is the case compared to 1.12.
I'll provide the details a later date, when I figure out how to properly get the decompiled 1.13.2 code and after further testing.
I fix MC197201, MC271336, MC272431 by changing a single number. Which means in net.minecraft.world.entity.boss.enderdragon Enderdragon.class, Mojang only needs to change this.setDeltaMovement(this.getDeltaMovement().add((double)0.0F, ydd * 0.01, (double)0.0F)) to this.setDeltaMovement(this.getDeltaMovement().add((double)0.0F, ydd * 0.1, (double)0.0F)).
My fix code is on https://github.com/EnderdragonGateway/important-bug-fix .
Before the fix: Dive fireball fails (MC197201, 272431), Perch too slow (MC271336, 272431).
After fix to what it should be: Dive Fireball successes, Perch normally. Like what in Bedrock Edition and Java 1.9-1.13. Also this fix don’t break other dragon behaviours like node flying and dragon phase, et.
You may say speedruning has 0 and 1 cycle. However, in more than 75% cases, y speed is so slow that it make dragon perching 3 times longer, which will waste so much time on waiting.
Like mining fatigue in MC279819, this is also caused by adding an extra 0 by mistake. But I really don’t know why it’s never fixed since 1.14 and do not synchronous to Bedrock if Mojang wants to design this. It’s really that hard to remove a single number in the code? The programmer who write this code in 1.14 is absolutely irresponsible at work!
There is a mistake: 19w08b does fix MC87942 and MC91858, and 1.14 does add knot flying mechanics. But that’s not relate to this bug.
The real reason is that this is completely manual typing mistake from a irresponsible staff of Mojang, the correct y speed is this.setDeltaMovement(this.getDeltaMovement().add((double)0.0F, ydd * 0.1, (double)0.0F)) , but he wrote this.setDeltaMovement(this.getDeltaMovement().add((double)0.0F, ydd * 0.01, (double)0.0F)). So Jean can’t dive to landing location in time, because y speed is not enough, which leads to flying back and forth around the target knot.
Just change 0.01 to 0.1 can fix this bug, including these related bugs: MC197201, MC271337, MC272431. Slow y speed dragon after 1.14 doesn’t exist on bedrock and java 1.9-1.13 at all!
can confirm that this is as I have seen it for years but never realized it was a bug