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
|
2023-12-06 19:07:47 +01:00
|
|
|
index abd20b1bbda4177a3f3be8abf3977866780a9b67..330a7921849a4b3ab0d7ef156af4880ef602d5eb 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
|
2023-12-06 17:00:26 +01:00
|
|
|
@@ -635,9 +635,10 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
2022-02-22 23:28:34 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
worlddata.setModdedInfo(this.getServerModName(), this.getModdedStatus().shouldReportAsModified());
|
2022-08-14 10:03:13 +02:00
|
|
|
+ this.addLevel(world); // Paper - 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);
|
2022-02-22 23:28:34 +01:00
|
|
|
+ // 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
|
2023-12-06 17:00:26 +01:00
|
|
|
index a8dc0e654d063a1b0c24bf6be454a168776ea600..1cf55dc3c358f5f2e0cb5acefc550699e021c1d9 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
|
2023-12-06 17:00:26 +01:00
|
|
|
@@ -1287,10 +1287,11 @@ public final class CraftServer implements Server {
|
2022-02-22 23:28:34 +01:00
|
|
|
return null;
|
|
|
|
}
|
|
|
|
|
2022-08-14 10:03:13 +02:00
|
|
|
+ this.console.addLevel(internal); // Paper - 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
|
|
|
|
|
|
|
internal.setSpawnSettings(true, true);
|
2022-08-14 10:03:13 +02:00
|
|
|
- this.console.addLevel(internal);
|
2022-02-22 23:28:34 +01:00
|
|
|
+ // 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
|