Workaround
Dragon cannot be respawned
Try the methods described in this comment to correct the ExitPortalLocation
.
Existing end gateways are regenerated
If you respawned the ender dragon as often as you had end gateways the next end gateway will generate correctly. For example if you had one end gateway and it was regenerated, the next ones will generate correctly and you will after all have all 20 gateways.
In case you did not respawn the dragon as often as there are end gateways you will have to edit the NBT data of the world. Be careful with this method and make a backup of your world before trying it.
Open the
level.dat
file of the affected world with a NBT editor such as NBTExplorerNavigate to
DimensionData
➔1
➔DragonFight
➔Gateways
Remove as many items (beginning at the top) as not regenerated gateways in your world exist. For example: There were 2 gateways. One was regenerated which lead you to this report. This means there is still one which was not regenerated, therefor you have to remove the first item from the list.
The bug
MC-103497 was about the <DragonFight> tag inside level.dat not being saved if no player visited the end during a server session, and then being regenerated incorrectly. This is now fixed. However, worlds that were affected by the bug do not have the regenerated data corrected.
If <ExitPortalLocation> was regenerated prior to 1.10.1, it has an incorrect <Y> value that does not correspond to the actual portal in the world.
The <Gateways> tag when regenerated contains the entire original list of gateways, thus killing the dragon will recreate existing gateways before opening new ones.
As a workaround, both of these can be easily fixed by using an NBT editor to fix level.dat.
Linked issues
is duplicated by 7
relates to 1
Attachments
Comments 25
You can try using the possible solutions @unknown provided
I am not sure whether this is the right place to post this, but I couldn't find a better place on the bug tracker and doubt it belongs anywhere else then on the bug tracker.
Situation: World created pre-1.9 and dragon slain pre-1.9. In 1.10.2 trying to respawn dragon for first time with four ender crystals at the normal positions on the single existing portal. The level.dat file shows a <DragonFight> tag, it also has the <Gateways> tag and the other two tags indicating whether a dragon fight is underway and how often the dragon was slain. The <ExitPortalLocation> tag is missing.
What happens: After placing the end crystals they are back in the inventory after re-logging or clicking the now empty inventory slot. Like if there are connection issues and the client thinks ahead wrongly. The placed end crystals (they have fire beneath, not sure whether intended) don't re-spawn the dragon, but are explosive.
Solution: When I place a single end crystal one block lower (breaking the bedrock beforehand) - I don't even have to place more then this single end crystal - a new portal gets generated in the middle of the island. The <ExitPortalLocation> tag is then created. The old portal still works. The new portal then behaves correctly, re-spawning the ender dragon as soon as the end crystals are placed correctly at this new portal.
Around the time when I place the end crystals at the position I would expect them to be placed (before forcing the creation of the second portal by removing bedrock and placing crystals on block lower) and nothing actually happens, the following errors get reported:
server log
[21:05:16] [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_101]
at java.util.concurrent.FutureTask.get(FutureTask.java:192) ~[?:1.8.0_101]
at h.a(SourceFile:46) [minecraft_server.jar:?]
at net.minecraft.server.MinecraftServer.D(SourceFile:598) [minecraft_server.jar:?]
at ld.D(SourceFile:338) [minecraft_server.jar:?]
at net.minecraft.server.MinecraftServer.C(SourceFile:554) [minecraft_server.jar:?]
at net.minecraft.server.MinecraftServer.run(SourceFile:458) [minecraft_server.jar:?]
at java.lang.Thread.run(Thread.java:745) [?:1.8.0_101]
Caused by: java.lang.NullPointerException
at atq.e(SourceFile:461) ~[minecraft_server.jar:?]
at adj.a(SourceFile:60) ~[minecraft_server.jar:?]
at adz.a(SourceFile:143) ~[minecraft_server.jar:?]
at lv.a(SourceFile:344) ~[minecraft_server.jar:?]
at me.a(SourceFile:627) ~[minecraft_server.jar:?]
at jj.a(SourceFile:55) ~[minecraft_server.jar:?]
at jj.a(SourceFile:11) ~[minecraft_server.jar:?]
at fl$1.run(SourceFile:13) ~[minecraft_server.jar:?]
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) ~[?:1.8.0_101]
at java.util.concurrent.FutureTask.run(FutureTask.java:266) ~[?:1.8.0_101]
at h.a(SourceFile:45) ~[minecraft_server.jar:?]
... 5 more
[21:05:20] [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_101]
at java.util.concurrent.FutureTask.get(FutureTask.java:192) ~[?:1.8.0_101]
at h.a(SourceFile:46) [minecraft_server.jar:?]
at net.minecraft.server.MinecraftServer.D(SourceFile:598) [minecraft_server.jar:?]
at ld.D(SourceFile:338) [minecraft_server.jar:?]
at net.minecraft.server.MinecraftServer.C(SourceFile:554) [minecraft_server.jar:?]
at net.minecraft.server.MinecraftServer.run(SourceFile:458) [minecraft_server.jar:?]
at java.lang.Thread.run(Thread.java:745) [?:1.8.0_101]
Caused by: java.lang.NullPointerException
at atq.e(SourceFile:461) ~[minecraft_server.jar:?]
at adj.a(SourceFile:60) ~[minecraft_server.jar:?]
at adz.a(SourceFile:143) ~[minecraft_server.jar:?]
at lv.a(SourceFile:344) ~[minecraft_server.jar:?]
at me.a(SourceFile:627) ~[minecraft_server.jar:?]
at jj.a(SourceFile:55) ~[minecraft_server.jar:?]
at jj.a(SourceFile:11) ~[minecraft_server.jar:?]
at fl$1.run(SourceFile:13) ~[minecraft_server.jar:?]
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) ~[?:1.8.0_101]
at java.util.concurrent.FutureTask.run(FutureTask.java:266) ~[?:1.8.0_101]
at h.a(SourceFile:45) ~[minecraft_server.jar:?]
... 5 more
[21:06:54] [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_101]
at java.util.concurrent.FutureTask.get(FutureTask.java:192) ~[?:1.8.0_101]
at h.a(SourceFile:46) [minecraft_server.jar:?]
at net.minecraft.server.MinecraftServer.D(SourceFile:598) [minecraft_server.jar:?]
at ld.D(SourceFile:338) [minecraft_server.jar:?]
at net.minecraft.server.MinecraftServer.C(SourceFile:554) [minecraft_server.jar:?]
at net.minecraft.server.MinecraftServer.run(SourceFile:458) [minecraft_server.jar:?]
at java.lang.Thread.run(Thread.java:745) [?:1.8.0_101]
Caused by: java.lang.NullPointerException
at atq.e(SourceFile:461) ~[minecraft_server.jar:?]
at adj.a(SourceFile:60) ~[minecraft_server.jar:?]
at adz.a(SourceFile:143) ~[minecraft_server.jar:?]
at lv.a(SourceFile:344) ~[minecraft_server.jar:?]
at me.a(SourceFile:627) ~[minecraft_server.jar:?]
at jj.a(SourceFile:55) ~[minecraft_server.jar:?]
at jj.a(SourceFile:11) ~[minecraft_server.jar:?]
at fl$1.run(SourceFile:13) ~[minecraft_server.jar:?]
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) ~[?:1.8.0_101]
at java.util.concurrent.FutureTask.run(FutureTask.java:266) ~[?:1.8.0_101]
at h.a(SourceFile:45) ~[minecraft_server.jar:?]
... 5 more
[21:06:57] [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_101]
at java.util.concurrent.FutureTask.get(FutureTask.java:192) ~[?:1.8.0_101]
at h.a(SourceFile:46) [minecraft_server.jar:?]
at net.minecraft.server.MinecraftServer.D(SourceFile:598) [minecraft_server.jar:?]
at ld.D(SourceFile:338) [minecraft_server.jar:?]
at net.minecraft.server.MinecraftServer.C(SourceFile:554) [minecraft_server.jar:?]
at net.minecraft.server.MinecraftServer.run(SourceFile:458) [minecraft_server.jar:?]
at java.lang.Thread.run(Thread.java:745) [?:1.8.0_101]
Caused by: java.lang.NullPointerException
at atq.e(SourceFile:461) ~[minecraft_server.jar:?]
at adj.a(SourceFile:60) ~[minecraft_server.jar:?]
at adz.a(SourceFile:143) ~[minecraft_server.jar:?]
at lv.a(SourceFile:344) ~[minecraft_server.jar:?]
at me.a(SourceFile:627) ~[minecraft_server.jar:?]
at jj.a(SourceFile:55) ~[minecraft_server.jar:?]
at jj.a(SourceFile:11) ~[minecraft_server.jar:?]
at fl$1.run(SourceFile:13) ~[minecraft_server.jar:?]
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) ~[?:1.8.0_101]
at java.util.concurrent.FutureTask.run(FutureTask.java:266) ~[?:1.8.0_101]
at h.a(SourceFile:45) ~[minecraft_server.jar:?]
... 5 more
I am posting this because it look very similar to the issue described here, but is still different. According to the description of @unknown here my world would be in "state #3", which should be fixed, however it is not fixed apparently. The only faulty behaviour is expected from a world in "state #4" according to this description, but this is apparently not the case exclusively.
@unknown, I would suggest creating a new report with for example the name "DragonFight: Respawn fails setting old found portal as exit portal after upgrading"
The following is based on a decompiled version of Minecraft 1.10 using MCP 9.30.
In 1.10 the method net.minecraft.world.end.DragonFightManager.respawnDragon()
set if no portal was found the position of the new portal as local portal location (lines after debug message "Couldn't find a portal, so we made one.") and if it found one it used that position (line after debug message "Found the exit portal & temporarily using it.").
Now in 16w36a it always uses the exit portal location and relies on the method auj.h()
(MCP 9.30 net.minecraft.world.end.DragonFightManager.findExitPortal()
) to set the exit portal. However, this only happens if the portal was found at 0, 0. When in line 464 the game then tries to add 1 to the y coordinate of the local exit portal location, a NullPointerException
happens because this position is still null
.
This issue seems to be old but I found this bug in my world in April 2023. If anyone is a little new to this workaround, I was still able to fix it after trying many suggestions I found online.
Get the program NBTExplorer, open it. click on the world where the end portal isn't generating. See if all 20 entries are listed.
In NBTExplorer, it said there were 19 gateways, so I added an entry. If I used the original locations of the same seed, the world just deleted the last entry after the dragon fight. So I took down all the existing portals, in creative mode. I went back in and added an entry in NBTExplorer. This time I used a list of entries from a completely different seed, and changed all the numbers to match it. The portals are now generating after the fights.
This report is currently missing crucial information. Please take a look at the other comments to find out what we are looking for.
If you added the required information and a moderator sees your comment, they will reopen and update the report. However, if you think your update to this report has been overlooked or you want to make sure that this report is reopened, you can contact the Mojira staff on Discord or Reddit.
-- I am a bot. This action was performed automatically! If you think it was incorrect, please notify us on Discord or Reddit
Hi.
Would it be possible to add a detailed explanation on how to fix this in the level.dat.
I'm already able to open, change and save the file in a NBT editor, so you can skip this part. 🙂
Thank you.