mirror of
https://github.com/EngineHub/WorldEdit.git
synced 2025-03-07 13:48:00 +08:00
parent
92dfe5e44e
commit
3fa364b448
@ -144,7 +144,7 @@ public int apply(int[] data) throws MaxChangedBlocksException {
|
||||
|
||||
// Grow -- start from 1 below top replacing airblocks
|
||||
for (int y = newHeight - 1 - originY; y >= 0; --y) {
|
||||
int copyFrom = (int) (y * scale);
|
||||
int copyFrom = (int) Math.floor(y * scale);
|
||||
session.setBlock(BlockVector3.at(xr, originY + y, zr), session.getBlock(BlockVector3.at(xr, originY + copyFrom, zr)));
|
||||
++blocksChanged;
|
||||
}
|
||||
@ -152,7 +152,7 @@ public int apply(int[] data) throws MaxChangedBlocksException {
|
||||
} else if (curHeight > newHeight) {
|
||||
// Shrink -- start from bottom
|
||||
for (int y = 0; y < newHeight - originY; ++y) {
|
||||
int copyFrom = (int) (y * scale);
|
||||
int copyFrom = (int) Math.floor(y * scale);
|
||||
session.setBlock(BlockVector3.at(xr, originY + y, zr), session.getBlock(BlockVector3.at(xr, originY + copyFrom, zr)));
|
||||
++blocksChanged;
|
||||
}
|
||||
|
@ -120,7 +120,7 @@ public int[] filter(int[] inData, int width, int height) {
|
||||
z += f * inData[offsetY + offsetX];
|
||||
}
|
||||
}
|
||||
outData[index++] = (int) (z + 0.5);
|
||||
outData[index++] = (int) Math.floor(z + 0.5);
|
||||
}
|
||||
}
|
||||
return outData;
|
||||
|
Loading…
Reference in New Issue
Block a user