mirror of
https://github.com/PaperMC/Paper.git
synced 2024-11-02 17:01:38 +01:00
6a7fef0e4a
* Allow entity effect modification off the main thread for worldgen * squash all async catcher patches
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 23fce58a5909c5b01a5f0ef6912f90858cd3302c..a30c61e176501d1cbd2e330f85d5d258cc030180 100644
|
|
--- a/src/main/java/net/minecraft/server/MinecraftServer.java
|
|
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java
|
|
@@ -603,9 +603,10 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
|
}
|
|
|
|
worlddata.setModdedInfo(this.getServerModName(), this.getModdedStatus().shouldReportAsModified());
|
|
+ this.addLevel(world); // Paper - move up
|
|
this.initWorld(world, worlddata, 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 a4b537774069dc5b3272e1fc06292d7b3144ff5b..2e88728e57ed95c458d5cd5071a245c280d4952e 100644
|
|
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
|
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
|
@@ -1246,10 +1246,11 @@ public final class CraftServer implements Server {
|
|
return null;
|
|
}
|
|
|
|
+ this.console.addLevel(internal); // Paper - move up
|
|
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);
|
|
//internal.entityManager.tick(); // SPIGOT-6526: Load pending entities so they are available to the API // Paper - rewrite chunk system
|