diff options
Diffstat (limited to 'patches/server/0545-add-per-world-spawn-limits.patch')
-rw-r--r-- | patches/server/0545-add-per-world-spawn-limits.patch | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/patches/server/0545-add-per-world-spawn-limits.patch b/patches/server/0545-add-per-world-spawn-limits.patch new file mode 100644 index 0000000000..6ed4ae68af --- /dev/null +++ b/patches/server/0545-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 691d65bca79d503a43f696d92a0a32226cddaad5..d72ceb866f8632a8daa7dc19acdc57b6b78fd906 100644 +--- a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java ++++ b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java +@@ -219,6 +219,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 |