mirror of
https://github.com/PaperMC/Paper.git
synced 2024-12-30 16:19:03 +01:00
Fix IllegalArgumentException for /paper mobcaps command (#7472)
This commit is contained in:
parent
aa0e21a2dc
commit
b42ccc8248
1 changed files with 3 additions and 0 deletions
|
@ -281,6 +281,9 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
|||
|
||||
+ // Paper start
|
||||
+ public static int globalLimitForCategory(final ServerLevel level, final MobCategory category, final int spawnableChunkCount) {
|
||||
+ if (category == MobCategory.MISC) {
|
||||
+ return -1;
|
||||
+ }
|
||||
+ final int categoryLimit = level.getWorld().getSpawnLimit(CraftSpawnCategory.toBukkit(category));
|
||||
+ if (categoryLimit < 1) {
|
||||
+ return categoryLimit;
|
||||
|
|
Loading…
Reference in a new issue