diff --git a/Spigot-Server-Patches/Only-count-Natural-Spawned-mobs-towards-natural-spaw.patch b/Spigot-Server-Patches/Only-count-Natural-Spawned-mobs-towards-natural-spaw.patch index e92f05361..9120de7f7 100644 --- a/Spigot-Server-Patches/Only-count-Natural-Spawned-mobs-towards-natural-spaw.patch +++ b/Spigot-Server-Patches/Only-count-Natural-Spawned-mobs-towards-natural-spaw.patch @@ -16,8 +16,27 @@ worse than vanilla. This should fully solve all of the issues around it so that only natural influences natural spawns. +diff --git a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java +index f259c4e514..fa1d88aa84 100644 +--- a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java ++++ b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java +@@ -0,0 +0,0 @@ public class PaperWorldConfig { + log("Using vanilla redstone algorithm."); + } + } ++ ++ public boolean countAllMobsForSpawning = false; ++ private void countAllMobsForSpawning() { ++ countAllMobsForSpawning = getBoolean("count-all-mobs-for-spawning", false); ++ if (countAllMobsForSpawning) { ++ log("Counting all mobs for spawning. Mob farms may reduce natural spawns elsewhere in world."); ++ } else { ++ log("Using improved mob spawn limits (Only Natural Spawns impact spawn limits for more natural spawns)"); ++ } ++ } + } diff --git a/src/main/java/com/destroystokyo/paper/PaperWorldEntityList.java b/src/main/java/com/destroystokyo/paper/PaperWorldEntityList.java -index a10a5bc138..8ad00c7d11 100644 +index a10a5bc138..346176cf98 100644 --- a/src/main/java/com/destroystokyo/paper/PaperWorldEntityList.java +++ b/src/main/java/com/destroystokyo/paper/PaperWorldEntityList.java @@ -0,0 +0,0 @@ import net.minecraft.server.IAnimal; @@ -34,7 +53,7 @@ index a10a5bc138..8ad00c7d11 100644 public void updateEntityCount(Entity entity, int amt) { - if (!(entity instanceof IAnimal)) return; + // Only count natural spawns so that mob -+ if (!(entity instanceof IAnimal) || entity.spawnReason != SpawnReason.NATURAL) return; ++ if (!(entity instanceof IAnimal) || (entity.spawnReason != SpawnReason.NATURAL && !world.paperConfig.countAllMobsForSpawning)) return; if (entity instanceof EntityInsentient) { EntityInsentient entityinsentient = (EntityInsentient) entity;