Paper/patches/server/0761-Put-world-into-worldlist-before-initing-the-world.patch

42 lines
2.2 KiB
Diff
Raw Normal View History

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
2023-12-06 19:07:47 +01:00
index abd20b1bbda4177a3f3be8abf3977866780a9b67..330a7921849a4b3ab0d7ef156af4880ef602d5eb 100644
--- a/src/main/java/net/minecraft/server/MinecraftServer.java
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java
2023-12-06 17:00:26 +01:00
@@ -635,9 +635,10 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
}
worlddata.setModdedInfo(this.getServerModName(), this.getModdedStatus().shouldReportAsModified());
+ this.addLevel(world); // Paper - move up
2023-10-27 01:34:58 +02:00
this.initWorld(world, worlddata, this.worldData, worldoptions);
- this.addLevel(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 ed69f084dc8a0c97ff83932d014d1020e16bd7f8..be57ec31869e2cf9db131ec64c7581564f2b42e6 100644
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
@@ -1288,10 +1288,11 @@ public final class CraftServer implements Server {
return null;
}
+ this.console.addLevel(internal); // Paper - move up
2022-12-07 22:35:34 +01:00
this.console.initWorld(internal, worlddata, worlddata, worlddata.worldGenOptions());
internal.setSpawnSettings(true, true);
- this.console.addLevel(internal);
+ // Paper - move up
this.getServer().prepareLevels(internal.getChunkSource().chunkMap.progressListener, internal);
2023-09-22 22:13:57 +02:00
//internal.entityManager.tick(); // SPIGOT-6526: Load pending entities so they are available to the API // Paper - rewrite chunk system