public CuboidCoord setSide(int s, int v) { switch (s) { case 0: min.y = v; break; case 1: max.y = v; break; case 2: min.z = v; break; case 3: max.z = v; break; case 4: min.x = v; break; case 5: max.x = v; break; default: throw new IndexOutOfBoundsException("Switch Falloff"); } return this; }
public CuboidCoord include(int x, int y, int z) { if (x < min.x) min.x = x; else if (x > max.x) max.x = x; if (y < min.y) min.y = y; else if (y > max.y) max.y = y; if (z < min.z) min.z = z; else if (z > max.z) max.z = z; return this; }