Mojira Archive
MC-104897

End crystals placed on exit portals generated before 1.9 do not respawn the ender dragon

The bug

The ender dragon cannot be respawned at an end portal if the dragon was killed before 1.9 and the resulting end portal is generated at a location other than (0,<y>,0).

Furthermore, when placing the necessary end crystals on the portal, this error will be logged:

[Server thread/FATAL]: Error executing task
java.util.concurrent.ExecutionException: java.lang.NullPointerException
	at java.util.concurrent.FutureTask.report(FutureTask.java:122) ~[?:1.8.0_51]
	at java.util.concurrent.FutureTask.get(FutureTask.java:192) ~[?:1.8.0_51]
	at k.a(SourceFile:200) [1.13.1.jar:?]
	at net.minecraft.server.MinecraftServer.b(SourceFile:726) [1.13.1.jar:?]
	at net.minecraft.server.MinecraftServer.a(SourceFile:681) [1.13.1.jar:?]
	at dgg.a(SourceFile:131) [1.13.1.jar:?]
	at net.minecraft.server.MinecraftServer.run(SourceFile:584) [1.13.1.jar:?]
	at java.lang.Thread.run(Thread.java:745) [?:1.8.0_51]
Caused by: java.lang.NullPointerException
	at bog.e(SourceFile:531) ~[1.13.1.jar:?]
	at asj.a(SourceFile:52) ~[1.13.1.jar:?]
	at atd.a(SourceFile:187) ~[1.13.1.jar:?]
	at tg.a(SourceFile:326) ~[1.13.1.jar:?]
	at uc.a(SourceFile:925) ~[1.13.1.jar:?]
	at nr.a(SourceFile:53) ~[1.13.1.jar:?]
	at nr.a(SourceFile:11) ~[1.13.1.jar:?]
	at ix.a(SourceFile:10) ~[1.13.1.jar:?]
	at ix$$Lambda$2000/1475818869.run(Unknown Source) ~[?:?]
	at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) ~[?:1.8.0_51]
	at java.util.concurrent.FutureTask.run(FutureTask.java:266) ~[?:1.8.0_51]
	at k.a(SourceFile:199) ~[1.13.1.jar:?]
	... 5 more

What I expected to happen was:

The ender dragon would respawn.

What actually happened was:

The ender dragon did not respawn.

How to reproduce

  1. Download the attached world world_MC-104897.zip
  2. Load the world in 1.10.1 or later.
  3. Enter the active end portal. (You should spawn at a stronghold)
  4. Locate the exit portal, and place the necessary crystals.
    See that the respawning process does not restart.

Code analysis (from MC-105304)

What seems to be happening (using MCP names) is that the fix for MC-103497 made DragonFightManager.respawnDragon() always try to use exitPortalLocation, even though findExitPortal() only sets this field when the detected portal is at (0,0). It should instead use the value returned by findExitPortal(), properly offset of course.


Workaround can be found here.