The different dragon phases (DragonPhase:0 through DragonPhase:10) of the Ender Dragon were broken by the fixes of MC-87942 and MC-91858. Previously, the Ender Dragon would freely fly around the arena with changing vertical heights. Due to the fix of the aforementioned two bugs, the Ender Dragon dragon phases have been broken, resulting in it getting stuck flying back and forth between two points in an oval-shape.
Expected Behavior: The ender dragon freely and fluently flies around the arena with changes in vertical height
Observed Behavior: The ender dragon frequently gets stuck going back and forth between two points, rather than fluently flying around the arena.
Relates to MC-271336
Linked issues
relates to 3
Attachments
Comments 8
I'm not sure if this is related but changing the phases with commands in the overworld doesn't seem to work the dragon only cares about 0,0 even with a command of
execute as @e[type=ender_dragon] run data merge entity @s {DragonPhase:8}
running in a repeat command block. The dragon ignores the player.
I am dubious that the bug was caused by a fix in the rendering of the entity. Dragon phases and rendering are pretty much completely seperate in the codebase, and my testing has suggested that it was rather the typo in aiStep (cf. MC-272431) that causes the bug rather than anything to do with the phases. (I did some comparisons between the codebase of 1.12 and 1.21 and found no obvious discrepancies)
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 reach that knot 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, MC271336, MC272431. Slow y speed dragon after 1.14 doesn’t exist on bedrock and java 1.9-1.13 at all!
Note that Bedrock Edition still has the correct AI, as those two bugs were never present on Bedrock and thus never caused the dragon phases to break.