mirror of
https://github.com/array-in-a-matrix/brainwine.git
synced 2025-04-02 11:11:58 -04:00
nextInt bound check to prevent it from failing world gen if 0
This commit is contained in:
parent
d14550b3f8
commit
5702d9671a
1 changed files with 1 additions and 1 deletions
|
@ -119,7 +119,7 @@ public class GeneratorContext {
|
|||
}
|
||||
|
||||
public int nextInt(int bound) {
|
||||
return random.nextInt(bound);
|
||||
return random.nextInt(Math.max(bound, 1));
|
||||
}
|
||||
|
||||
public double nextDouble() {
|
||||
|
|
Loading…
Add table
Reference in a new issue