Gets the face that this block is attached on @return BlockFace attached to
()
| 43 | * @return BlockFace attached to |
| 44 | */ |
| 45 | public BlockFace getAttachedFace() { |
| 46 | if (isWallSign()) { |
| 47 | byte data = getData(); |
| 48 | |
| 49 | switch (data) { |
| 50 | case 0x2: |
| 51 | return BlockFace.WEST; |
| 52 | |
| 53 | case 0x3: |
| 54 | return BlockFace.EAST; |
| 55 | |
| 56 | case 0x4: |
| 57 | return BlockFace.SOUTH; |
| 58 | |
| 59 | case 0x5: |
| 60 | return BlockFace.NORTH; |
| 61 | } |
| 62 | |
| 63 | return null; |
| 64 | } else { |
| 65 | return BlockFace.DOWN; |
| 66 | } |
| 67 | } |
| 68 | |
| 69 | /** |
| 70 | * Gets the direction that this sign is currently facing |
no test coverage detected