mirror of
https://github.com/plexusorg/Plex-FAWE.git
synced 2025-06-11 20:13:55 +00:00
Fixed not flipping the center plane blocks.
Added regression test so we'll never have to deal with it again.
This commit is contained in:
@ -206,16 +206,16 @@ public class CuboidClipboard {
|
||||
for (int xs = 0; xs < wid; ++xs) {
|
||||
for (int z = 0; z < length; ++z) {
|
||||
for (int y = 0; y < height; ++y) {
|
||||
// Skip the center plane
|
||||
if (xs == width - xs - 1) {
|
||||
continue;
|
||||
}
|
||||
|
||||
final BaseBlock block1 = data[xs][y][z];
|
||||
if (block1 != null) {
|
||||
block1.flip(dir);
|
||||
}
|
||||
|
||||
// Skip the center plane
|
||||
if (xs == width - xs - 1) {
|
||||
continue;
|
||||
}
|
||||
|
||||
final BaseBlock block2 = data[width - xs - 1][y][z];
|
||||
if (block2 != null) {
|
||||
block2.flip(dir);
|
||||
@ -238,16 +238,16 @@ public class CuboidClipboard {
|
||||
for (int zs = 0; zs < len; ++zs) {
|
||||
for (int x = 0; x < width; ++x) {
|
||||
for (int y = 0; y < height; ++y) {
|
||||
// Skip the center plane
|
||||
if (zs == length - zs - 1) {
|
||||
continue;
|
||||
}
|
||||
|
||||
final BaseBlock block1 = data[x][y][zs];
|
||||
if (block1 != null) {
|
||||
block1.flip(dir);
|
||||
}
|
||||
|
||||
// Skip the center plane
|
||||
if (zs == length - zs - 1) {
|
||||
continue;
|
||||
}
|
||||
|
||||
final BaseBlock block2 = data[x][y][length - zs - 1];
|
||||
if (block2 != null) {
|
||||
block2.flip(dir);
|
||||
@ -270,16 +270,16 @@ public class CuboidClipboard {
|
||||
for (int ys = 0; ys < hei; ++ys) {
|
||||
for (int x = 0; x < width; ++x) {
|
||||
for (int z = 0; z < length; ++z) {
|
||||
// Skip the center plane
|
||||
if (ys == height - ys - 1) {
|
||||
continue;
|
||||
}
|
||||
|
||||
final BaseBlock block1 = data[x][ys][z];
|
||||
if (block1 != null) {
|
||||
block1.flip(dir);
|
||||
}
|
||||
|
||||
// Skip the center plane
|
||||
if (ys == height - ys - 1) {
|
||||
continue;
|
||||
}
|
||||
|
||||
final BaseBlock block2 = data[x][height - ys - 1][z];
|
||||
if (block2 != null) {
|
||||
block2.flip(dir);
|
||||
|
Reference in New Issue
Block a user