2022-02-22 23:28:34 +01:00
|
|
|
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
|
2024-10-31 22:30:18 +01:00
|
|
|
index df93afc35403db15aa8e09b7e36ca0bb630041eb..4cbb5fdcb8734d3944963b911bb759923ad38d16 100644
|
2022-02-22 23:28:34 +01:00
|
|
|
--- a/src/main/java/net/minecraft/server/MinecraftServer.java
|
|
|
|
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java
|
2024-10-31 22:30:18 +01:00
|
|
|
@@ -657,9 +657,10 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
2022-02-22 23:28:34 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
worlddata.setModdedInfo(this.getServerModName(), this.getModdedStatus().shouldReportAsModified());
|
2024-01-18 18:52:00 +01:00
|
|
|
+ this.addLevel(world); // Paper - Put world into worldlist before initing the world; move up
|
2023-10-27 01:34:58 +02:00
|
|
|
this.initWorld(world, worlddata, this.worldData, worldoptions);
|
2022-02-22 23:28:34 +01:00
|
|
|
|
2022-08-14 10:03:13 +02:00
|
|
|
- this.addLevel(world);
|
2024-01-18 18:52:00 +01:00
|
|
|
+ // Paper - Put world into worldlist before initing the world; move up
|
2022-02-22 23:28:34 +01:00
|
|
|
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
|
2024-10-27 18:11:15 +01:00
|
|
|
index 59690263f1cb27f2289b027ffd31c1e1ac4f2e69..fcd8b3ce258bdb12a87d41d348ac847d5dc603f8 100644
|
2022-02-22 23:28:34 +01:00
|
|
|
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
|
|
|
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
2024-10-27 18:11:15 +01:00
|
|
|
@@ -1336,10 +1336,11 @@ public final class CraftServer implements Server {
|
2022-02-22 23:28:34 +01:00
|
|
|
return null;
|
|
|
|
}
|
|
|
|
|
2024-01-18 18:52:00 +01:00
|
|
|
+ this.console.addLevel(internal); // Paper - Put world into worldlist before initing the world; move up
|
2022-12-07 22:35:34 +01:00
|
|
|
this.console.initWorld(internal, worlddata, worlddata, worlddata.worldGenOptions());
|
2022-02-22 23:28:34 +01:00
|
|
|
|
2024-10-23 22:52:43 +02:00
|
|
|
internal.setSpawnSettings(true);
|
2022-08-14 10:03:13 +02:00
|
|
|
- this.console.addLevel(internal);
|
2024-01-18 18:52:00 +01:00
|
|
|
+ // Paper - Put world into worldlist before initing the world; move up
|
2022-02-22 23:28:34 +01:00
|
|
|
|
|
|
|
this.getServer().prepareLevels(internal.getChunkSource().chunkMap.progressListener, internal);
|
2024-01-24 15:57:53 +01:00
|
|
|
internal.entityManager.tick(); // SPIGOT-6526: Load pending entities so they are available to the API
|