mirror of
https://github.com/plexusorg/Plex-FAWE.git
synced 2024-12-23 01:37:37 +00:00
Fix #288 sphere min/max y
This commit is contained in:
parent
c2cc4f5aeb
commit
4a4f5bcc74
@ -1928,6 +1928,8 @@ public class EditSession extends PassthroughExtent implements AutoCloseable {
|
||||
final int ceilRadiusY = (int) Math.ceil(radiusY);
|
||||
final int ceilRadiusZ = (int) Math.ceil(radiusZ);
|
||||
|
||||
int yy;
|
||||
|
||||
double nextXn = invRadiusX;
|
||||
forX: for (int x = 0; x <= ceilRadiusX; ++x) {
|
||||
final double xn = nextXn;
|
||||
@ -1962,19 +1964,21 @@ public class EditSession extends PassthroughExtent implements AutoCloseable {
|
||||
continue;
|
||||
}
|
||||
}
|
||||
|
||||
yy = py + y;
|
||||
if (yy <= maxY) {
|
||||
this.setBlock(px + x, py + y, pz + z, block);
|
||||
if (x != 0) this.setBlock(px - x, py + y, pz + z, block);
|
||||
if (z != 0) {
|
||||
this.setBlock(px + x, py + y, pz - z, block);
|
||||
if (x != 0) this.setBlock(px - x, py + y, pz - z, block);
|
||||
}
|
||||
if (y != 0) {
|
||||
this.setBlock(px + x, py - y, pz + z, block);
|
||||
if (x != 0) this.setBlock(px - x, py - y, pz + z, block);
|
||||
}
|
||||
if (y != 0 && (yy = py - y) >= 0) {
|
||||
this.setBlock(px + x, yy, pz + z, block);
|
||||
if (x != 0) this.setBlock(px - x, yy, pz + z, block);
|
||||
if (z != 0) {
|
||||
this.setBlock(px + x, py - y, pz - z, block);
|
||||
if (x != 0) this.setBlock(px - x, py - y, pz - z, block);
|
||||
this.setBlock(px + x, yy, pz - z, block);
|
||||
if (x != 0) this.setBlock(px - x, yy, pz - z, block);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user