Commits
Nathan Wolf authored and md_5 committed 7bc9c08eb4b
42 42 | } |
43 43 | if (!force && !hanging.survives()) { |
44 44 | // Revert since it doesn't fit |
45 45 | hanging.setDirection(dir); |
46 46 | return false; |
47 47 | } |
48 48 | return true; |
49 49 | } |
50 50 | |
51 51 | public BlockFace getFacing() { |
52 - | switch (this.getHandle().direction) { |
52 + | EnumDirection direction = this.getHandle().direction; |
53 + | if (direction == null) return BlockFace.SELF; |
54 + | switch (direction) { |
53 55 | case SOUTH: |
54 56 | default: |
55 57 | return BlockFace.SOUTH; |
56 58 | case WEST: |
57 59 | return BlockFace.WEST; |
58 60 | case NORTH: |
59 61 | return BlockFace.NORTH; |
60 62 | case EAST: |
61 63 | return BlockFace.EAST; |
62 64 | } |