diff --git a/nms-patches/MinecraftServer.patch b/nms-patches/MinecraftServer.patch index 80a20100a0..f2d80e21c9 100644 --- a/nms-patches/MinecraftServer.patch +++ b/nms-patches/MinecraftServer.patch @@ -253,27 +253,27 @@ + if (worlddata.getCustomBossEvents() != null) { + this.getBossBattleCustomData().a(worlddata.getCustomBossEvents()); + } -+ } + } + this.a(this.getDifficulty(), true); + for (WorldServer worldserver : this.getWorlds()) { + this.loadSpawn(worldserver.getChunkProvider().playerChunkMap.worldLoadListener, worldserver); - } - -- WorldServer worldserver = new WorldServer(this, this.executorService, worldnbtstorage, worlddata, DimensionManager.OVERWORLD, this.methodProfiler, worldloadlistener); ++ } ++ + this.server.enablePlugins(org.bukkit.plugin.PluginLoadOrder.POSTWORLD); + this.server.getPluginManager().callEvent(new ServerLoadEvent(ServerLoadEvent.LoadType.STARTUP)); + // CraftBukkit end -- this.worldServer.put(DimensionManager.OVERWORLD, worldserver); -- this.initializeScoreboards(worldserver.getWorldPersistentData()); -- worldserver.getWorldBorder().b(worlddata); -- WorldServer worldserver1 = this.getWorldServer(DimensionManager.OVERWORLD); +- WorldServer worldserver = new WorldServer(this, this.executorService, worldnbtstorage, worlddata, DimensionManager.OVERWORLD, this.methodProfiler, worldloadlistener); + } + + // CraftBukkit start + public void initWorld(WorldServer worldserver1, WorldData worlddata, WorldSettings worldsettings) { + worldserver1.getWorldBorder().b(worlddata); -+ + +- this.worldServer.put(DimensionManager.OVERWORLD, worldserver); +- this.initializeScoreboards(worldserver.getWorldPersistentData()); +- worldserver.getWorldBorder().b(worlddata); +- WorldServer worldserver1 = this.getWorldServer(DimensionManager.OVERWORLD); + // CraftBukkit start + if (worldserver1.generator != null) { + worldserver1.getWorld().getPopulators().addAll(worldserver1.generator.getDefaultPopulators(worldserver1.getWorld())); @@ -402,6 +402,23 @@ } protected void a(String s, WorldNBTStorage worldnbtstorage) { +@@ -450,14 +625,14 @@ + } catch (ExceptionWorldConflict exceptionworldconflict) { + MinecraftServer.LOGGER.warn(exceptionworldconflict.getMessage()); + } +- } + +- WorldServer worldserver1 = this.getWorldServer(DimensionManager.OVERWORLD); ++ WorldServer worldserver1 = worldserver; // CraftBukkit + WorldData worlddata = worldserver1.getWorldData(); + + worldserver1.getWorldBorder().a(worlddata); + worlddata.c(this.getBossBattleCustomData().c()); + worldserver1.getDataManager().saveWorldData(worlddata, this.getPlayerList().r()); ++ } // CraftBukkit - moved down + return flag3; + } + @@ -466,8 +641,29 @@ this.stop(); }