mirror of
https://github.com/PaperMC/Paper.git
synced 2024-11-22 10:35:38 +01:00
38428c0d6c
Remove utilities that are unused, as well as replacing the full chunk map with a concurrentutil implementation. Additionally, fix the addition/removal of chunks to/from the full chunk map so that getChunkIfLoaded correctly returns a non-null chunk when calling the load or unload events.
42 lines
2.3 KiB
Diff
42 lines
2.3 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 0ec8f1c94279b75369ab6bae98789c60a971502c..4e2ce30bc67b0033107715a5a2dbb419bdf17a4f 100644
|
|
--- a/src/main/java/net/minecraft/server/MinecraftServer.java
|
|
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java
|
|
@@ -644,9 +644,10 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
|
}
|
|
|
|
worlddata.setModdedInfo(this.getServerModName(), this.getModdedStatus().shouldReportAsModified());
|
|
+ this.addLevel(world); // Paper - Put world into worldlist before initing the world; move up
|
|
this.initWorld(world, worlddata, this.worldData, worldoptions);
|
|
|
|
- this.addLevel(world);
|
|
+ // Paper - Put world into worldlist before initing the world; 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 bce783d63dc5d1ed9cda135b22bb78aa1be3ea17..dace717d426c1af257ea2f7728d5e5b7850ba568 100644
|
|
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
|
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
|
@@ -1323,10 +1323,11 @@ public final class CraftServer implements Server {
|
|
return null;
|
|
}
|
|
|
|
+ this.console.addLevel(internal); // Paper - Put world into worldlist before initing the world; move up
|
|
this.console.initWorld(internal, worlddata, worlddata, worlddata.worldGenOptions());
|
|
|
|
internal.setSpawnSettings(true, true);
|
|
- this.console.addLevel(internal);
|
|
+ // Paper - Put world into worldlist before initing the world; 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
|