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
|
|
|
|
|
|
|
|
|
|
|
|
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
|
2024-04-06 21:53:39 +02:00
|
|
|
index 685851278af7ae0afe2009592d8c57bd01f92267..95a5f2ef87252ab3fb684d1e04e2a3d05a3aa4bb 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
|
2024-04-06 21:53:39 +02:00
|
|
|
@@ -222,6 +222,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)));
|
|
|
|
+ }
|
|
|
|
+ }
|
2024-01-19 13:22:30 +01:00
|
|
|
+ // Paper end - per world spawn limits
|
2022-06-09 10:51:45 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
@Override
|