From 18cdab89b6a850172ff30b34a1c6a4fe8949985a Mon Sep 17 00:00:00 2001 From: TudbuT Date: Fri, 31 May 2024 22:24:37 +0200 Subject: [PATCH] fix selection splitting in Y direction --- .../main/java/com/baseband/client/util/interact/BlockUtils.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Client/src/main/java/com/baseband/client/util/interact/BlockUtils.java b/Client/src/main/java/com/baseband/client/util/interact/BlockUtils.java index ac02d93..c767d0f 100644 --- a/Client/src/main/java/com/baseband/client/util/interact/BlockUtils.java +++ b/Client/src/main/java/com/baseband/client/util/interact/BlockUtils.java @@ -20,7 +20,7 @@ public class BlockUtils { zSideLength = sectionSideLength; for (int i = 0; i < selections.length; i++) { BlockPos pos1 = selection.pos1.add(xSideLength * i, 0, zSideLength * i); - BlockPos pos2 = selection.pos1.add(Math.max(Math.min(xSideLength * (i + 1), selSideLength) - 1, 0), 0, Math.min(Math.max(zSideLength * (i + 1) - 1, 0), selSideLength - 1)); + BlockPos pos2 = selection.pos1.add(Math.max(Math.min(xSideLength * (i + 1), selSideLength) - 1, 0), selection.pos2.getY(), Math.min(Math.max(zSideLength * (i + 1) - 1, 0), selSideLength - 1)); selections[i] = new Selection(pos1, pos2); } return selections;