Uploaded image for project: 'Minecraft: Java Edition'
  1. Minecraft: Java Edition
  2. MC-104897

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


    • Icon: Bug Bug
    • Resolution: Fixed
    • 1.17 Pre-release 1
    • Minecraft 1.10.2, Minecraft 1.11.2, Minecraft 1.13, Minecraft 18w30a, Minecraft 18w32a, Minecraft 1.13.1, Minecraft 1.13.2-pre1, Minecraft 1.13.2-pre2, Minecraft 1.13.2, Minecraft 18w43a, Minecraft 18w43b, Minecraft 18w43c, Minecraft 18w44a, Minecraft 18w45a, Minecraft 18w46a, Minecraft 18w47a, Minecraft 18w47b, Minecraft 18w48a, Minecraft 18w48b, Minecraft 18w49a, Minecraft 18w50a, Minecraft 19w02a, Minecraft 19w03b, Minecraft 19w03c, Minecraft 19w04b, Minecraft 19w05a, Minecraft 19w06a, Minecraft 19w08b, Minecraft 19w09a, Minecraft 19w11a, Minecraft 19w11b, Minecraft 19w12b, Minecraft 19w13b, Minecraft 19w14a, Minecraft 19w14b, Minecraft 1.14 Pre-Release 1, Minecraft 1.14 Pre-Release 2, Minecraft 1.14 Pre-Release 3, Minecraft 1.14 Pre-Release 4, Minecraft 1.14 Pre-Release 5, Minecraft 1.14, Minecraft 1.14.1, Minecraft 1.14.2 Pre-Release 1, Minecraft 1.14.2 Pre-Release 2, Minecraft 1.14.2, Minecraft 1.14.3 Pre-Release 2, 1.14.4, 19w40a, 19w41a, 19w42a, 1.15 Pre-release 1, 1.15 Pre-Release 2, 1.15.1, 1.15.2, 20w11a, 20w12a, 1.16.5
    • Confirmed
    • Datafixer
    • Very Important

      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.

        1. 2016-07-01_16.35.34.png
          1.85 MB
        2. 2016-07-02_10.13.29.png
          765 kB
        3. 2016-07-03_15.34.19.png
          397 kB
        4. 2016-07-03_15.35.04.png
          422 kB
        5. bug_dragon.txt
          12 kB
        6. MC-104897.zip
          7.38 MB
        7. world_MC-104897.zip
          454 kB

            mgatland [Mojang] Matthew Gatland
            carpet0928 carpet0928
            19 Vote for this issue
            19 Start watching this issue