MCPcopy Create free account
hub / github.com/Teneted/Tenet / setFacingDirection

Method setFacingDirection

src/main/java/org/bukkit/material/Button.java:88–119  ·  view source on GitHub ↗

Sets the direction this button is pointing toward

(BlockFace face)

Source from the content-addressed store, hash-verified

86 * Sets the direction this button is pointing toward
87 */
88 @Override
89 public void setFacingDirection(BlockFace face) {
90 byte data = (byte) (getData() & 0x8);
91
92 switch (face) {
93 case DOWN:
94 data |= 0x0;
95 break;
96
97 case EAST:
98 data |= 0x1;
99 break;
100
101 case WEST:
102 data |= 0x2;
103 break;
104
105 case SOUTH:
106 data |= 0x3;
107 break;
108
109 case NORTH:
110 data |= 0x4;
111 break;
112
113 case UP:
114 data |= 0x5;
115 break;
116 }
117
118 setData(data);
119 }
120
121 @Override
122 public String toString() {

Callers

nothing calls this directly

Calls 2

getDataMethod · 0.65
setDataMethod · 0.65

Tested by

no test coverage detected