Fixed stairs orientation.

This commit is contained in:
tastybento 2018-07-01 15:28:53 -07:00
parent 947853061e
commit bc39e82dd2

View File

@ -246,7 +246,10 @@ public class Clipboard {
if (md instanceof Directional) { if (md instanceof Directional) {
Directional facing = (Directional)md; Directional facing = (Directional)md;
if (md instanceof Stairs) { if (md instanceof Stairs) {
facing.setFacingDirection(BlockFace.valueOf(s.getString(FACING)).getOppositeFace()); //facing.setFacingDirection(BlockFace.valueOf(s.getString(FACING)).getOppositeFace());
Stairs stairs = (Stairs)md;
stairs.setInverted(s.getBoolean("inverted"));
stairs.setFacingDirection(BlockFace.valueOf(s.getString(FACING)));
} else { } else {
facing.setFacingDirection(BlockFace.valueOf(s.getString(FACING))); facing.setFacingDirection(BlockFace.valueOf(s.getString(FACING)));
} }
@ -262,6 +265,8 @@ public class Clipboard {
} }
// Block data // Block data
if (bs instanceof Sign) { if (bs instanceof Sign) {
Sign sign = (Sign)bs; Sign sign = (Sign)bs;
List<String> lines = s.getStringList("lines"); List<String> lines = s.getStringList("lines");
@ -359,8 +364,15 @@ public class Clipboard {
s.set("open", open.isOpen()); s.set("open", open.isOpen());
} }
if (md instanceof Directional) { if (md instanceof Directional) {
Directional facing = (Directional)md; if (md instanceof Stairs) {
s.set(FACING, facing.getFacing().name()); //facing.setFacingDirection(BlockFace.valueOf(s.getString(FACING)).getOppositeFace());
Stairs stairs = (Stairs)md;
s.set("inverted", stairs.isInverted());
s.set(FACING, stairs.getAscendingDirection());
} else {
Directional facing = (Directional)md;
s.set(FACING, facing.getFacing().name());
}
} }
if (md instanceof Attachable) { if (md instanceof Attachable) {
Attachable facing = (Attachable)md; Attachable facing = (Attachable)md;