mirror of
https://github.com/boy0001/FastAsyncWorldedit.git
synced 2024-11-25 03:55:35 +01:00
CuboidClipboard rotation fix
This commit is contained in:
parent
8603729390
commit
ebdcf1afcd
@ -480,7 +480,7 @@ public class CuboidClipboard {
|
||||
Math.abs(sizeRotated.getBlockY()),
|
||||
Math.abs(sizeRotated.getBlockZ()));
|
||||
offset = offset.transform2D(angle, 0, 0, 0, 0)
|
||||
.subtract(shiftX, 0, shiftZ);
|
||||
.subtract(shiftX, 0, shiftZ).round();
|
||||
dx = cloned.dx;
|
||||
dxz = cloned.dxz;
|
||||
}
|
||||
@ -694,16 +694,12 @@ public class CuboidClipboard {
|
||||
* @throws MaxChangedBlocksException thrown if too many blocks were changed
|
||||
*/
|
||||
public void place(EditSession editSession, Vector newOrigin, boolean noAir) throws MaxChangedBlocksException {
|
||||
Vector v = new Vector(0, 0, 0);
|
||||
int ox = newOrigin.getBlockX();
|
||||
int oy = newOrigin.getBlockY();
|
||||
int oz = newOrigin.getBlockZ();
|
||||
for (int x = 0; x < size.getBlockX(); ++x) {
|
||||
v.mutX(x + ox);
|
||||
for (int y = 0; y < size.getBlockY(); ++y) {
|
||||
v.mutY(y + oy);
|
||||
for (int z = 0; z < size.getBlockZ(); ++z) {
|
||||
v.mutZ(z + oz);
|
||||
for (int y = 0; y < size.getBlockY(); ++y) {
|
||||
for (int z = 0; z < size.getBlockZ(); ++z) {
|
||||
for (int x = 0; x < size.getBlockX(); ++x) {
|
||||
final BaseBlock block = getBlock(x, y, z);
|
||||
if (block == null) {
|
||||
continue;
|
||||
@ -711,7 +707,7 @@ public class CuboidClipboard {
|
||||
if (noAir && block.isAir()) {
|
||||
continue;
|
||||
}
|
||||
editSession.setBlockFast(new Vector(x, y, z).add(newOrigin), block);
|
||||
editSession.setBlock(x + ox, y + oy, z + oz, block);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user