From 79f7a95fc6ef469ca60f68ed887747ad2116249b Mon Sep 17 00:00:00 2001 From: Jesse Boyd Date: Thu, 16 Feb 2017 02:21:58 +1100 Subject: [PATCH] Fix cuboid iteration --- .../main/java/com/sk89q/worldedit/regions/CuboidRegion.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/core/src/main/java/com/sk89q/worldedit/regions/CuboidRegion.java b/core/src/main/java/com/sk89q/worldedit/regions/CuboidRegion.java index 2525063d..268e4e73 100644 --- a/core/src/main/java/com/sk89q/worldedit/regions/CuboidRegion.java +++ b/core/src/main/java/com/sk89q/worldedit/regions/CuboidRegion.java @@ -445,7 +445,7 @@ public class CuboidRegion extends AbstractRegion implements FlatRegion { y = by; if (x > tx) { x = bx; - if (z > tz) { + if (z >= tz) { if (!hasNext) { throw new NoSuchElementException("End of iterator") { @Override @@ -455,6 +455,8 @@ public class CuboidRegion extends AbstractRegion implements FlatRegion { }; } hasNext = false; + --x; + --y; return mutable; } } else {