Fixes mob spawning when no maxmob value given.

Found while doing #108
This commit is contained in:
tastybento 2023-09-19 21:48:45 -07:00
parent 02c2135501
commit 53cb40e7c4
1 changed files with 1 additions and 1 deletions

View File

@ -167,7 +167,7 @@ public class EcoSystemManager {
Collections.shuffle(list, new Random(System.currentTimeMillis()));
Iterator<GrowthBlock> it = list.iterator();
// Check if the greenhouse is full
if (sum >= gh.getBiomeRecipe().getMaxMob()) {
if (gh.getBiomeRecipe().getMaxMob() > -1 && sum >= gh.getBiomeRecipe().getMaxMob()) {
return false;
}
while (it.hasNext() && (sum == 0 || gh.getArea() / sum >= gh.getBiomeRecipe().getMobLimit())) {