Sets the direction this diode is facing. @param face The direction to set this diode to @see BlockFace
(BlockFace face)
| 122 | * @see BlockFace |
| 123 | */ |
| 124 | @Override |
| 125 | public void setFacingDirection(BlockFace face) { |
| 126 | int delay = getDelay(); |
| 127 | byte data; |
| 128 | |
| 129 | switch (face) { |
| 130 | case EAST: |
| 131 | data = 0x1; |
| 132 | break; |
| 133 | case SOUTH: |
| 134 | data = 0x2; |
| 135 | break; |
| 136 | case WEST: |
| 137 | data = 0x3; |
| 138 | break; |
| 139 | case NORTH: |
| 140 | default: |
| 141 | data = 0x0; |
| 142 | } |
| 143 | |
| 144 | setData(data); |
| 145 | setDelay(delay); |
| 146 | } |
| 147 | |
| 148 | /** |
| 149 | * Gets the direction this diode is facing |