diff --git a/patches/server/0804-Add-paper-mobcaps-and-paper-playermobcaps.patch b/patches/server/0804-Add-paper-mobcaps-and-paper-playermobcaps.patch index b7a79669c..6a6e4b292 100644 --- a/patches/server/0804-Add-paper-mobcaps-and-paper-playermobcaps.patch +++ b/patches/server/0804-Add-paper-mobcaps-and-paper-playermobcaps.patch @@ -270,7 +270,7 @@ index 2ef4b4c2ff81d0fa33d4630593266066d8e6a6f3..34bc24403a83ae578d2fc3956b488389 List worlds; if (args.length < 2 || args[1].equals("*")) { diff --git a/src/main/java/net/minecraft/world/level/NaturalSpawner.java b/src/main/java/net/minecraft/world/level/NaturalSpawner.java -index 403f50ef908f65c62d4aaa7e5328faa0a7654480..b59f1554b4ad26d362c41c00b7a864a72efbd602 100644 +index 403f50ef908f65c62d4aaa7e5328faa0a7654480..afb4e740fd11e0249e70e9aea7ae1e7bebca702f 100644 --- a/src/main/java/net/minecraft/world/level/NaturalSpawner.java +++ b/src/main/java/net/minecraft/world/level/NaturalSpawner.java @@ -144,28 +144,15 @@ public final class NaturalSpawner { @@ -310,7 +310,7 @@ index 403f50ef908f65c62d4aaa7e5328faa0a7654480..b59f1554b4ad26d362c41c00b7a864a7 } if (!spawnThisTick || limit == 0) { -@@ -204,6 +191,23 @@ public final class NaturalSpawner { +@@ -204,6 +191,27 @@ public final class NaturalSpawner { world.getProfiler().pop(); } @@ -327,7 +327,11 @@ index 403f50ef908f65c62d4aaa7e5328faa0a7654480..b59f1554b4ad26d362c41c00b7a864a7 + } + + public static int globalLimitForCategory(final ServerLevel level, final MobCategory category, final int spawnableChunkCount) { -+ return limitForCategory(level, category) * spawnableChunkCount / NaturalSpawner.MAGIC_NUMBER; ++ final int categoryLimit = limitForCategory(level, category); ++ if (categoryLimit < 1) { ++ return categoryLimit; ++ } ++ return categoryLimit * spawnableChunkCount / NaturalSpawner.MAGIC_NUMBER; + } + // Paper end +