mirror of
https://github.com/PaperMC/Paper.git
synced 2024-12-29 12:27:59 +01:00
Fix global limit display for MISC mob category (#6612)
This commit is contained in:
parent
76a6ed89c7
commit
667baeed68
@ -327,7 +327,11 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
|||||||
+ }
|
+ }
|
||||||
+
|
+
|
||||||
+ public static int globalLimitForCategory(final ServerLevel level, final MobCategory category, final int spawnableChunkCount) {
|
+ 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
|
+ // Paper end
|
||||||
+
|
+
|
||||||
|
Loading…
Reference in New Issue
Block a user