3
0
Mirror von https://github.com/IntellectualSites/FastAsyncWorldEdit.git synchronisiert 2024-11-05 02:50:05 +01:00

Fix #288 sphere min/max y

Dieser Commit ist enthalten in:
Jesse Boyd 2019-12-21 05:20:17 +00:00
Ursprung c2cc4f5aeb
Commit 4a4f5bcc74
Es konnte kein GPG-Schlüssel zu dieser Signatur gefunden werden
GPG-Schlüssel-ID: 59F1DE6293AF6E1F

Datei anzeigen

@ -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;
}
}
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);
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);
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, yy, pz - z, block);
if (x != 0) this.setBlock(px - x, yy, pz - z, block);
}
}
}