mirror of
https://github.com/PaperMC/Paper.git
synced 2025-01-16 06:30:46 +01:00
add per world spawn limits
This commit is contained in:
parent
750a4590ce
commit
9b7c0ce420
1 changed files with 7 additions and 0 deletions
|
@ -219,6 +219,13 @@ public class CraftWorld extends CraftRegionAccessor implements World {
|
|||
this.biomeProvider = biomeProvider;
|
||||
|
||||
this.environment = env;
|
||||
// Paper start - per world spawn limits
|
||||
for (SpawnCategory spawnCategory : SpawnCategory.values()) {
|
||||
if (CraftSpawnCategory.isValidForLimits(spawnCategory)) {
|
||||
setSpawnLimit(spawnCategory, this.world.paperConfig().entities.spawning.spawnLimits.getInt(CraftSpawnCategory.toNMS(spawnCategory)));
|
||||
}
|
||||
}
|
||||
// Paper end - per world spawn limits
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
Loading…
Reference in a new issue