Skip to content

Commit

Permalink
Fixes mob spawning when no maxmob value given.
Browse files Browse the repository at this point in the history
Found while doing #108
  • Loading branch information
tastybento committed Sep 20, 2023
1 parent 02c2135 commit 53cb40e
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -167,7 +167,7 @@ boolean addMobs(Greenhouse gh) {
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())) {
Expand Down

0 comments on commit 53cb40e

Please sign in to comment.