adjust TilePrefab rotation to work with the cleaned up Tile rotation stuff
This commit is contained in:
parent
a7d571e477
commit
6199f58cf5
|
@ -234,20 +234,13 @@ public class TilePrefab extends TileContainer {
|
||||||
if (!copyEmptyTiles && sourceTile.isEmptySpace())
|
if (!copyEmptyTiles && sourceTile.isEmptySpace())
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
if (Bitfield.isSet(Tile.FLAG_FACE_NORTH, sourceTile.flags) ||
|
// copy it right away, any modifications that we need to do as part of this copy
|
||||||
Bitfield.isSet(Tile.FLAG_FACE_EAST, sourceTile.flags) ||
|
// should only be done against destTile (leave the source data intact! herp derp, references!)
|
||||||
Bitfield.isSet(Tile.FLAG_FACE_SOUTH, sourceTile.flags) ||
|
|
||||||
Bitfield.isSet(Tile.FLAG_FACE_WEST, sourceTile.flags)) {
|
|
||||||
if (rotation.equals(Rotation.ROT90))
|
|
||||||
sourceTile.rotateClockwise();
|
|
||||||
else if (rotation.equals(Rotation.ROT180))
|
|
||||||
sourceTile.rotateClockwise().rotateClockwise();
|
|
||||||
else if (rotation.equals(Rotation.ROT270))
|
|
||||||
sourceTile.rotateClockwise().rotateClockwise().rotateClockwise();
|
|
||||||
}
|
|
||||||
|
|
||||||
Tile destTile = destination.get(minX + x, minY + y, minZ + z);
|
Tile destTile = destination.get(minX + x, minY + y, minZ + z);
|
||||||
destTile.set(sourceTile);
|
destTile.set(sourceTile);
|
||||||
|
|
||||||
|
if (destTile.isRotated())
|
||||||
|
destTile.rotateClockwise(rotation.value / 90);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue