Properly scale the random in SimpleRandomCollection (#2220)

This commit is contained in:
Hannes Greule
2023-05-12 23:13:35 +02:00
committed by GitHub
parent c57fee5b86
commit 71bac009db

View File

@ -36,7 +36,7 @@ public class SimpleRandomCollection<E> extends RandomCollection<E> {
@Override
public E next(int x, int y, int z) {
return map.ceilingEntry(getRandom().nextDouble(x, y, z)).getValue();
return map.ceilingEntry(getRandom().nextDouble(x, y, z) * this.total).getValue();
}
}