MCPcopy Create free account
hub / github.com/PaperMC/Paper / putOnFace

Method putOnFace

paper-api/src/main/java/org/bukkit/material/Vine.java:112–147  ·  view source on GitHub ↗

Attach the vine to the specified face of an adjacent block. @param face The face to attach.

(BlockFace face)

Source from the content-addressed store, hash-verified

110 * @param face The face to attach.
111 */
112 public void putOnFace(BlockFace face) {
113 switch (face) {
114 case WEST:
115 setData((byte) (getData() | VINE_WEST));
116 break;
117 case NORTH:
118 setData((byte) (getData() | VINE_NORTH));
119 break;
120 case SOUTH:
121 setData((byte) (getData() | VINE_SOUTH));
122 break;
123 case EAST:
124 setData((byte) (getData() | VINE_EAST));
125 break;
126 case NORTH_WEST:
127 putOnFace(BlockFace.WEST);
128 putOnFace(BlockFace.NORTH);
129 break;
130 case SOUTH_WEST:
131 putOnFace(BlockFace.WEST);
132 putOnFace(BlockFace.SOUTH);
133 break;
134 case NORTH_EAST:
135 putOnFace(BlockFace.EAST);
136 putOnFace(BlockFace.NORTH);
137 break;
138 case SOUTH_EAST:
139 putOnFace(BlockFace.EAST);
140 putOnFace(BlockFace.SOUTH);
141 break;
142 case UP:
143 break;
144 default:
145 throw new IllegalArgumentException("Vines can't go on face " + face.toString());
146 }
147 }
148
149 /**
150 * Detach the vine from the specified face of an adjacent block.

Callers

nothing calls this directly

Calls 3

setDataMethod · 0.65
getDataMethod · 0.65
toStringMethod · 0.45

Tested by

no test coverage detected