mirror of
https://github.com/boy0001/FastAsyncWorldedit.git
synced 2025-01-06 08:28:14 +01:00
Fixes #471
This commit is contained in:
parent
26404fc9db
commit
6ac7782d9a
@ -576,16 +576,16 @@ public class CuboidRegion extends AbstractRegion implements FlatRegion {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean hasNext() {
|
public boolean hasNext() {
|
||||||
return (nextX != Integer.MIN_VALUE);
|
return (nextZ != Integer.MIN_VALUE);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public Vector2D next() {
|
public Vector2D next() {
|
||||||
if (!hasNext()) throw new java.util.NoSuchElementException();
|
if (!hasNext()) throw new java.util.NoSuchElementException();
|
||||||
Vector2D answer = mutable.setComponents(nextX, nextZ);
|
Vector2D answer = mutable.setComponents(nextX, nextZ);
|
||||||
if (++nextZ > max.getBlockZ()) {
|
if (++nextX > max.getBlockX()) {
|
||||||
nextZ = min.getBlockZ();
|
nextX = min.getBlockX();
|
||||||
if (++nextX > max.getBlockX()) {
|
if (++nextZ > max.getBlockZ()) {
|
||||||
nextZ = Integer.MIN_VALUE;
|
nextZ = Integer.MIN_VALUE;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user