diff --git a/src/main/java/land/chipmunk/chipmunkmod/modules/CommandCore.java b/src/main/java/land/chipmunk/chipmunkmod/modules/CommandCore.java index 3cb5ceb..e3d43ff 100644 --- a/src/main/java/land/chipmunk/chipmunkmod/modules/CommandCore.java +++ b/src/main/java/land/chipmunk/chipmunkmod/modules/CommandCore.java @@ -188,26 +188,21 @@ public class CommandCore { public void incrementCurrentBlock() { if (withPos == null) return; - int x = block.getX(); + + int x = block.getX() + 1; int y = block.getY(); int z = block.getZ(); - x++; - if (x > withPos.getMaxX()) { x = withPos.getMinX(); z++; - } - - if (z > withPos.getMaxZ()) { - z = withPos.getMinZ(); - y++; - } - - if (y > withPos.getMaxY()) { - x = withPos.getMinX(); - y = withPos.getMinY(); - z = withPos.getMinZ(); + if (z > withPos.getMaxZ()) { + z = withPos.getMinZ(); + y++; + if (y > withPos.getMaxY()) { + y = withPos.getMinY(); + } + } } block = new BlockPos(x, y, z);