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

Method setFacingDirection

src/main/java/org/bukkit/material/Diode.java:124–146  ·  view source on GitHub ↗

Sets the direction this diode is facing. @param face The direction to set this diode to @see BlockFace

(BlockFace face)

Source from the content-addressed store, hash-verified

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

Callers 1

DiodeMethod · 0.95

Calls 3

getDelayMethod · 0.95
setDelayMethod · 0.95
setDataMethod · 0.65

Tested by

no test coverage detected