diff --git a/src/main/java/org/bukkit/material/Lever.java b/src/main/java/org/bukkit/material/Lever.java index 66c47b4ea8..0ceacbc23c 100644 --- a/src/main/java/org/bukkit/material/Lever.java +++ b/src/main/java/org/bukkit/material/Lever.java @@ -116,6 +116,9 @@ public void setFacingDirection(BlockFace face) { break; } + + setData(data); + return; } else if (face == BlockFace.DOWN) { switch (attach) { case EAST: @@ -129,49 +132,52 @@ public void setFacingDirection(BlockFace face) { data |= 0x7; break; } + + setData(data); + return; + } + + if (attach == BlockFace.DOWN) { + switch (face) { + case SOUTH: + case NORTH: + data |= 0x5; + break; + + case EAST: + case WEST: + data |= 0x6; + break; + } + } else if (attach == BlockFace.UP) { + switch (face) { + case SOUTH: + case NORTH: + data |= 0x7; + break; + + case EAST: + case WEST: + data |= 0x0; + break; + } } else { - if (attach == BlockFace.DOWN) { - switch (face) { - case SOUTH: - case NORTH: - data |= 0x5; - break; - - case EAST: - case WEST: - data |= 0x6; - break; - } - } else if (attach == BlockFace.UP) { - switch (face) { - case SOUTH: - case NORTH: - data |= 0x7; - break; - - case EAST: - case WEST: - data |= 0x0; - break; - } - } else { - switch (face) { - case EAST: - data |= 0x1; - break; - - case WEST: - data |= 0x2; - break; - - case SOUTH: - data |= 0x3; - break; - - case NORTH: - data |= 0x4; - break; - } + switch (face) { + case EAST: + data |= 0x1; + break; + + case WEST: + data |= 0x2; + break; + + case SOUTH: + data |= 0x3; + break; + + case NORTH: + data |= 0x4; + break; } } setData(data);