From 10b7c54b021ce9ee63170a1f32c5ed397cf18330 Mon Sep 17 00:00:00 2001 From: GTNH-Colen <54497873+GTNH-Colen@users.noreply.github.com> Date: Tue, 18 Jun 2024 00:47:32 +0100 Subject: [PATCH] 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. --- src/main/java/forestry/core/utils/vect/Vect.java | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/main/java/forestry/core/utils/vect/Vect.java b/src/main/java/forestry/core/utils/vect/Vect.java index e8f27a0f4..f52afef2f 100644 --- a/src/main/java/forestry/core/utils/vect/Vect.java +++ b/src/main/java/forestry/core/utils/vect/Vect.java @@ -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); }