mirror of
https://github.com/BentoBoxWorld/CaveBlock.git
synced 2025-01-22 21:01:20 +01:00
Do not set mob spawn rates unless set to >0 in config.yml.
This commit is contained in:
parent
3c4cabacc2
commit
1c5ed92b25
@ -200,12 +200,24 @@ public class CaveBlock extends GameModeAddon
|
||||
|
||||
private void setSpawnRates(World w) {
|
||||
if (w != null) {
|
||||
w.setMonsterSpawnLimit(getSettings().getSpawnLimitMonsters());
|
||||
w.setAmbientSpawnLimit(getSettings().getSpawnLimitAmbient());
|
||||
w.setAnimalSpawnLimit(getSettings().getSpawnLimitAnimals());
|
||||
w.setWaterAnimalSpawnLimit(getSettings().getSpawnLimitWaterAnimals());
|
||||
w.setTicksPerAnimalSpawns(getSettings().getTicksPerAnimalSpawns());
|
||||
w.setTicksPerMonsterSpawns(getSettings().getTicksPerMonsterSpawns());
|
||||
if (getSettings().getSpawnLimitMonsters() > 0) {
|
||||
w.setMonsterSpawnLimit(getSettings().getSpawnLimitMonsters());
|
||||
}
|
||||
if (getSettings().getSpawnLimitAmbient() > 0) {
|
||||
w.setAmbientSpawnLimit(getSettings().getSpawnLimitAmbient());
|
||||
}
|
||||
if (getSettings().getSpawnLimitAnimals() > 0) {
|
||||
w.setAnimalSpawnLimit(getSettings().getSpawnLimitAnimals());
|
||||
}
|
||||
if (getSettings().getSpawnLimitWaterAnimals() > 0) {
|
||||
w.setWaterAnimalSpawnLimit(getSettings().getSpawnLimitWaterAnimals());
|
||||
}
|
||||
if (getSettings().getTicksPerAnimalSpawns() > 0) {
|
||||
w.setTicksPerAnimalSpawns(getSettings().getTicksPerAnimalSpawns());
|
||||
}
|
||||
if (getSettings().getTicksPerMonsterSpawns() > 0) {
|
||||
w.setTicksPerMonsterSpawns(getSettings().getTicksPerMonsterSpawns());
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user