mirror of
https://github.com/plexusorg/Plex-FAWE.git
synced 2025-06-30 18:46:40 +00:00
Changed //cyl and //hcyl to respect boundaries.
This commit is contained in:
@ -887,6 +887,19 @@ public class EditSession {
|
||||
int d = (5 - radius * 4) / 4;
|
||||
int affected = 0;
|
||||
|
||||
if (height == 0) {
|
||||
return 0;
|
||||
} else if (height < 0) {
|
||||
height = -height;
|
||||
pos = pos.subtract(0, height, 0);
|
||||
}
|
||||
|
||||
if (pos.getBlockY() - height - 1 < 0) {
|
||||
height = pos.getBlockY() + 1;
|
||||
} else if (pos.getBlockY() + height - 1 > 127) {
|
||||
height = 127 - pos.getBlockY() + 1;
|
||||
}
|
||||
|
||||
affected += makeHCylinderPoints(pos, x, z, height, block);
|
||||
|
||||
while (x < z) {
|
||||
@ -961,6 +974,19 @@ public class EditSession {
|
||||
int d = (5 - radius * 4) / 4;
|
||||
int affected = 0;
|
||||
|
||||
if (height == 0) {
|
||||
return 0;
|
||||
} else if (height < 0) {
|
||||
height = -height;
|
||||
pos = pos.subtract(0, height, 0);
|
||||
}
|
||||
|
||||
if (pos.getBlockY() - height - 1 < 0) {
|
||||
height = pos.getBlockY() + 1;
|
||||
} else if (pos.getBlockY() + height - 1 > 127) {
|
||||
height = 127 - pos.getBlockY() + 1;
|
||||
}
|
||||
|
||||
affected += makeCylinderPoints(pos, x, z, height, block);
|
||||
|
||||
while (x < z) {
|
||||
|
Reference in New Issue
Block a user