Fix the range of bees being off by one block. nextInt is [0,n), so we need to do n+1 to get our boundary included.

This commit is contained in:
GTNH-Colen committed 2024-06-18 00:47:32 +01:00
1 parent 7549707704
commit 10b7c54b02
1 file changed
+3 -3
@@ -73,9 +73,9 @@ public class Vect implements IVect {
}
public static Vect getRandomPositionInArea(Random random, IVect area) {
int x = random.nextInt(area.getX());
int y = random.nextInt(area.getY());
int z = random.nextInt(area.getZ());
int x = random.nextInt(area.getX() + 1);
int y = random.nextInt(area.getY() + 1);
int z = random.nextInt(area.getZ() + 1);
return new Vect(x, y, z);
}