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

Method setFacingDirection

src/main/java/org/bukkit/material/Door.java:87–103  ·  view source on GitHub ↗

Set the direction that this door should is facing. @param face the direction

(BlockFace face)

Source from the content-addressed store, hash-verified

85 * @param face the direction
86 */
87 public void setFacingDirection(BlockFace face) {
88 byte data = (byte) (getData() & 0x12);
89 switch (face) {
90 case EAST:
91 data |= 0x1;
92 break;
93
94 case SOUTH:
95 data |= 0x2;
96 break;
97
98 case WEST:
99 data |= 0x3;
100 break;
101 }
102 setData(data);
103 }
104
105 /**
106 * Get the direction that this door is facing.

Callers

nothing calls this directly

Calls 2

getDataMethod · 0.65
setDataMethod · 0.65

Tested by

no test coverage detected