MCPcopy Create free account
hub / github.com/Bukkit/Bukkit / getAttachedFace

Method getAttachedFace

src/main/java/org/bukkit/material/Sign.java:45–67  ·  view source on GitHub ↗

Gets the face that this block is attached on @return BlockFace attached to

()

Source from the content-addressed store, hash-verified

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

Callers 1

getFacingMethod · 0.95

Calls 2

isWallSignMethod · 0.95
getDataMethod · 0.65

Tested by

no test coverage detected