MCPcopy Create free account
hub / github.com/VolmitSoftware/Adapt / corners

Method corners

src/main/java/com/volmit/adapt/util/Cuboid.java:316–328  ·  view source on GitHub ↗

Get the Blocks at the eight corners of the Cuboid. @return array of Block objects representing the Cuboid corners

()

Source from the content-addressed store, hash-verified

314 * @return array of Block objects representing the Cuboid corners
315 */
316 public Block[] corners() {
317 Block[] res = new Block[8];
318 World w = getWorld();
319 res[0] = w.getBlockAt(x1, y1, z1);
320 res[1] = w.getBlockAt(x1, y1, z2);
321 res[2] = w.getBlockAt(x1, y2, z1);
322 res[3] = w.getBlockAt(x1, y2, z2);
323 res[4] = w.getBlockAt(x2, y1, z1);
324 res[5] = w.getBlockAt(x2, y1, z2);
325 res[6] = w.getBlockAt(x2, y2, z1);
326 res[7] = w.getBlockAt(x2, y2, z2);
327 return res;
328 }
329
330 /**
331 * Expand the Cuboid in the given direction by the given amount. Negative

Callers

nothing calls this directly

Calls 1

getWorldMethod · 0.95

Tested by

no test coverage detected