diff options
Diffstat (limited to 'patches/server/0557-add-per-world-spawn-limits.patch')
-rw-r--r-- | patches/server/0557-add-per-world-spawn-limits.patch | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/patches/server/0557-add-per-world-spawn-limits.patch b/patches/server/0557-add-per-world-spawn-limits.patch new file mode 100644 index 0000000000..2af34cd439 --- /dev/null +++ b/patches/server/0557-add-per-world-spawn-limits.patch @@ -0,0 +1,24 @@ +From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 +From: chase <[email protected]> +Date: Wed, 2 Dec 2020 22:43:39 -0800 +Subject: [PATCH] add per world spawn limits + + +diff --git a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java +index dc16ed952719a5203b1b9a61e0ad2bd39021e8f1..a41c6705aa7e04ad32395f89b95ca76617c9416d 100644 +--- a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java ++++ b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java +@@ -222,6 +222,13 @@ public class CraftWorld extends CraftRegionAccessor implements World { + this.biomeProvider = biomeProvider; + + this.environment = env; ++ // 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))); ++ } ++ } ++ // Paper end - per world spawn limits + } + + @Override |