fix selection splitting for the final time

This commit is contained in:
Daniella / Tove 2024-05-31 23:00:55 +02:00
parent 3faa5acec7
commit 3e08bb93e8
Signed by: TudbuT
GPG key ID: B3CF345217F202D3

View file

@ -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), size.getY(), Math.min(Math.max(zSideLength * (i + 1) - 1, 0), selSideLength - 1));
BlockPos pos2 = selection.pos1.add((xSideLength == 0 ? size.getX() - 1 : Math.min(xSideLength * (i + 1), selSideLength) - 1), size.getY() - 1, (zSideLength == 0 ? size.getZ() - 1 : Math.min(zSideLength * (i + 1) - 1, selSideLength - 1)));
selections[i] = new Selection(pos1, pos2);
}
return selections;