nextInt bound check to prevent it from failing world gen if 0

This commit is contained in:
kuroppoi 2022-03-30 01:21:00 +02:00
parent d14550b3f8
commit 5702d9671a

View file

@ -119,7 +119,7 @@ public class GeneratorContext {
} }
public int nextInt(int bound) { public int nextInt(int bound) {
return random.nextInt(bound); return random.nextInt(Math.max(bound, 1));
} }
public double nextDouble() { public double nextDouble() {