Set the direction that this door should is facing. @param face the direction
(BlockFace face)
| 85 | * @param face the direction |
| 86 | */ |
| 87 | public void setFacingDirection(BlockFace face) { |
| 88 | byte data = (byte) (getData() & 0x12); |
| 89 | switch (face) { |
| 90 | case EAST: |
| 91 | data |= 0x1; |
| 92 | break; |
| 93 | |
| 94 | case SOUTH: |
| 95 | data |= 0x2; |
| 96 | break; |
| 97 | |
| 98 | case WEST: |
| 99 | data |= 0x3; |
| 100 | break; |
| 101 | } |
| 102 | setData(data); |
| 103 | } |
| 104 | |
| 105 | /** |
| 106 | * Get the direction that this door is facing. |