From 117535040049e5f6726d665dc93dd2bc7b02e96b Mon Sep 17 00:00:00 2001 From: Spottedleaf Date: Mon, 27 Mar 2023 16:06:19 -0700 Subject: [PATCH] Fix failure to initialise CraftWorld Directly access spawn category limits rather than go through the method --- patches/server/0004-Threaded-Regions.patch | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/patches/server/0004-Threaded-Regions.patch b/patches/server/0004-Threaded-Regions.patch index eddbb4d..93a7b2c 100644 --- a/patches/server/0004-Threaded-Regions.patch +++ b/patches/server/0004-Threaded-Regions.patch @@ -23171,7 +23171,7 @@ index e0b6c737f9de2b6e692d6813d8dea4c35f038573..851937baff90177e648d970cf1c462b8 @Override diff --git a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java -index ff6559bf563f2fdcc0f2843d4f4aa24d7ddfb6db..4ca5157149af223ef270ed84059ef4b968c62e39 100644 +index ff6559bf563f2fdcc0f2843d4f4aa24d7ddfb6db..eb8206eaeb83ed8cfb86b1889166cfefddbdd70d 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java @@ -180,7 +180,7 @@ public class CraftWorld extends CraftRegionAccessor implements World { @@ -23183,6 +23183,15 @@ index ff6559bf563f2fdcc0f2843d4f4aa24d7ddfb6db..4ca5157149af223ef270ed84059ef4b9 } @Override +@@ -237,7 +237,7 @@ public class CraftWorld extends CraftRegionAccessor implements World { + // Paper start - per world spawn limits + for (SpawnCategory spawnCategory : SpawnCategory.values()) { + if (CraftSpawnCategory.isValidForLimits(spawnCategory)) { +- setSpawnLimit(spawnCategory, this.world.paperConfig().entities.spawning.spawnLimits.getInt(CraftSpawnCategory.toNMS(spawnCategory))); ++ this.spawnCategoryLimit.put(spawnCategory, this.world.paperConfig().entities.spawning.spawnLimits.getInt(CraftSpawnCategory.toNMS(spawnCategory))); // Folia - region threading + } + } + // Paper end @@ -329,6 +329,7 @@ public class CraftWorld extends CraftRegionAccessor implements World { @Override