2022-06-09 10:51:45 +02:00
|
|
|
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
|
|
|
From: chase <chasewhip20@gmail.com>
|
|
|
|
Date: Wed, 2 Dec 2020 22:43:39 -0800
|
|
|
|
Subject: [PATCH] add per world spawn limits
|
|
|
|
|
|
|
|
Taken from #2982. Credit to Chasewhip8
|
|
|
|
|
|
|
|
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
|
2022-11-03 22:03:31 +01:00
|
|
|
index b39a9924f6dd8facc8f22b3e98f5a48cdd555f4c..5f780daddfc90c44bd621cee7a2a72a20b292e29 100644
|
2022-06-09 10:51:45 +02:00
|
|
|
--- a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
|
|
|
|
+++ b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
|
2022-09-01 18:51:59 +02:00
|
|
|
@@ -210,6 +210,13 @@ public class CraftWorld extends CraftRegionAccessor implements World {
|
2022-06-09 10:51:45 +02:00
|
|
|
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
|
|
|
|
}
|
|
|
|
|
|
|
|
@Override
|