From 667baeed686d67f008b6c377c9db40413b0b746d Mon Sep 17 00:00:00 2001 From: Jason Penilla <11360596+jpenilla@users.noreply.github.com> Date: Thu, 16 Sep 2021 16:40:11 -0500 Subject: [PATCH] Fix global limit display for MISC mob category (#6612) --- .../server/Add-paper-mobcaps-and-paper-playermobcaps.patch | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/patches/server/Add-paper-mobcaps-and-paper-playermobcaps.patch b/patches/server/Add-paper-mobcaps-and-paper-playermobcaps.patch index 4a1589e3e4..6f90598837 100644 --- a/patches/server/Add-paper-mobcaps-and-paper-playermobcaps.patch +++ b/patches/server/Add-paper-mobcaps-and-paper-playermobcaps.patch @@ -327,7 +327,11 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 + } + + 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 +