mirror of
https://github.com/PaperMC/Paper.git
synced 2024-11-27 04:55:47 +01:00
42 lines
2.2 KiB
Diff
42 lines
2.2 KiB
Diff
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
|
From: Spottedleaf <Spottedleaf@users.noreply.github.com>
|
|
Date: Tue, 22 Feb 2022 14:21:35 -0800
|
|
Subject: [PATCH] Put world into worldlist before initing the world
|
|
|
|
Some parts of legacy conversion will need the overworld
|
|
to get the legacy structure data storage
|
|
|
|
diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java
|
|
index 443fb9cdce8bf542ca6216aa65c3e48c66dde654..e4461fb3485391ec0a9d902d5b896bb95e7512b5 100644
|
|
--- a/src/main/java/net/minecraft/server/MinecraftServer.java
|
|
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java
|
|
@@ -629,9 +629,10 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
|
}
|
|
|
|
worlddata.setModdedInfo(this.getServerModName(), this.getModdedStatus().shouldReportAsModified());
|
|
+ this.levels.put(world.dimension(), world); // Paper - move up
|
|
this.initWorld(world, worlddata, worldData, worlddata.worldGenSettings());
|
|
|
|
- this.levels.put(world.dimension(), world);
|
|
+ // Paper - move up
|
|
this.getPlayerList().addWorldborderListener(world);
|
|
|
|
if (worlddata.getCustomBossEvents() != null) {
|
|
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
|
index 196640c203b3c33c1e967b2f1bf1fa360dc6952b..c5b9770669f9ed51408ea4f10d03f2e737ba9eb9 100644
|
|
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
|
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
|
@@ -1255,10 +1255,11 @@ public final class CraftServer implements Server {
|
|
return null;
|
|
}
|
|
|
|
+ console.levels.put(internal.dimension(), internal); // Paper - move up
|
|
this.console.initWorld(internal, worlddata, worlddata, worlddata.worldGenSettings());
|
|
|
|
internal.setSpawnSettings(true, true);
|
|
- console.levels.put(internal.dimension(), internal);
|
|
+ // Paper - move up
|
|
|
|
this.getServer().prepareLevels(internal.getChunkSource().chunkMap.progressListener, internal);
|
|
internal.entityManager.tick(); // SPIGOT-6526: Load pending entities so they are available to the API
|