Class BlockCubeUtil

java.lang.Object
com.hypixel.hytale.math.block.BlockCubeUtil

public class BlockCubeUtil extends Object
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    static <T> boolean
    forEachBlock(int originX, int originY, int originZ, int radiusX, int height, int radiusZ, boolean evenXZ, boolean evenY, T t, TriIntObjPredicate<T> consumer)
     
    static <T> boolean
    forEachBlock(int originX, int originY, int originZ, int radiusX, int height, int radiusZ, int thickness, boolean cappedTop, boolean cappedBottom, boolean hollow, boolean evenXZ, boolean evenY, T t, TriIntObjPredicate<T> consumer)
     
    static <T> boolean
    forEachBlock(int originX, int originY, int originZ, int radiusX, int height, int radiusZ, int thickness, boolean cappedTop, boolean cappedBottom, boolean hollow, T t, TriIntObjPredicate<T> consumer)
    Runs the specified operation on all blocks in the cuboid specified by the parameters.
    static <T> boolean
    forEachBlock(int originX, int originY, int originZ, int radiusX, int height, int radiusZ, int thickness, boolean capped, T t, TriIntObjPredicate<T> consumer)
    Runs the specified operation on all blocks in the cuboid specified by the parameters.
    static <T> boolean
    forEachBlock(int originX, int originY, int originZ, int radiusX, int height, int radiusZ, int thickness, T t, TriIntObjPredicate<T> consumer)
    Runs the specified operation on all blocks in the cuboid specified by the parameters.
    static <T> boolean
    forEachBlock(int originX, int originY, int originZ, int radiusX, int height, int radiusZ, T t, TriIntObjPredicate<T> consumer)
    Runs the specified operation on all blocks in the cuboid specified by the parameters.
    static <T> boolean
    forEachBlock(org.joml.Vector3i pointOne, org.joml.Vector3i pointTwo, int thickness, boolean cappedTop, boolean cappedBottom, boolean hollow, T t, TriIntObjPredicate<T> consumer)
    Runs the specified operation on all blocks in the cuboid specified by the parameters.
    static <T> boolean
    forEachBlock(org.joml.Vector3i pointOne, org.joml.Vector3i pointTwo, T t, TriIntObjPredicate<T> consumer)
    Runs the specified operation on all blocks in the cuboid specified by the parameters.

    Methods inherited from class Object

    equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • BlockCubeUtil

      public BlockCubeUtil()
  • Method Details

    • forEachBlock

      public static <T> boolean forEachBlock(int originX, int originY, int originZ, int radiusX, int height, int radiusZ, T t, @Nonnull TriIntObjPredicate<T> consumer)
      Runs the specified operation on all blocks in the cuboid specified by the parameters. The iteration count is equal to the reported block count.
      Parameters:
      originX - The center of the cuboid on the X axis
      originY - The center of the cuboid on the Y axis
      originZ - The center of the cuboid on the Z axis
      radiusX - The radius of the cuboid on the X axis. Must be greater than 0.
      height - The height of the cuboid on the Y axis. Must be greater than 0.
      radiusZ - The radius of the cuboid on the Z axis. Must be greater than 0.
      consumer - The operation to execute on each of the coordinates' values
    • forEachBlock

      public static <T> boolean forEachBlock(int originX, int originY, int originZ, int radiusX, int height, int radiusZ, boolean evenXZ, boolean evenY, T t, @Nonnull TriIntObjPredicate<T> consumer)
    • forEachBlock

      public static <T> boolean forEachBlock(int originX, int originY, int originZ, int radiusX, int height, int radiusZ, int thickness, T t, @Nonnull TriIntObjPredicate<T> consumer)
      Runs the specified operation on all blocks in the cuboid specified by the parameters. The iteration count is equal to the reported block count.
      Parameters:
      originX - The center of the cuboid on the X axis
      originY - The center of the cuboid on the Y axis
      originZ - The center of the cuboid on the Z axis
      radiusX - The radius of the cuboid on the X axis. Must be greater than 0.
      height - The height of the cuboid on the Y axis. Must be greater than 0.
      radiusZ - The radius of the cuboid on the Z axis. Must be greater than 0.
      thickness - The thickness of the hollow cuboid. Must be greater 0.
      consumer - The operation to execute on each of the coordinates' values
    • forEachBlock

      public static <T> boolean forEachBlock(int originX, int originY, int originZ, int radiusX, int height, int radiusZ, int thickness, boolean capped, T t, @Nonnull TriIntObjPredicate<T> consumer)
      Runs the specified operation on all blocks in the cuboid specified by the parameters. The iteration count is equal to the reported block count.
      Parameters:
      originX - The center of the cuboid on the X axis
      originY - The center of the cuboid on the Y axis
      originZ - The center of the cuboid on the Z axis
      radiusX - The radius of the cuboid on the X axis. Must be greater than 0.
      height - The height of the cuboid on the Y axis. Must be greater than 0.
      radiusZ - The radius of the cuboid on the Z axis. Must be greater than 0.
      thickness - The thickness of the hollow cuboid. Must be greater 0.
      capped - A flag to control whether the end(s) of the hollow shape is closed (true) or open (false).
      consumer - The operation to execute on each of the coordinates' values
    • forEachBlock

      public static <T> boolean forEachBlock(int originX, int originY, int originZ, int radiusX, int height, int radiusZ, int thickness, boolean cappedTop, boolean cappedBottom, boolean hollow, T t, @Nonnull TriIntObjPredicate<T> consumer)
      Runs the specified operation on all blocks in the cuboid specified by the parameters. The iteration count is equal to the reported block count.
      Parameters:
      originX - The center of the cuboid on the X axis
      originY - The center of the cuboid on the Y axis
      originZ - The center of the cuboid on the Z axis
      radiusX - The radius of the cuboid on the X axis. Must be greater than 0.
      height - The height of the cuboid on the Y axis. Must be greater than 0.
      radiusZ - The radius of the cuboid on the Z axis. Must be greater than 0.
      thickness - The thickness of the hollow cuboid. Must be greater 0.
      cappedTop - A flag to control whether the end(s) of the hollow shape is closed on the top (true) or open (false).
      cappedBottom - A flag to control whether the end(s) of the hollow shape is closed on the bottom (true) or open (false).
      hollow - A flag to only operate on the inside of the cube based on thickness, leaving the walls alone, and operating on the inside
      consumer - The operation to execute on each of the coordinates' values
    • forEachBlock

      public static <T> boolean forEachBlock(int originX, int originY, int originZ, int radiusX, int height, int radiusZ, int thickness, boolean cappedTop, boolean cappedBottom, boolean hollow, boolean evenXZ, boolean evenY, T t, @Nonnull TriIntObjPredicate<T> consumer)
    • forEachBlock

      public static <T> boolean forEachBlock(@Nonnull org.joml.Vector3i pointOne, @Nonnull org.joml.Vector3i pointTwo, T t, @Nonnull TriIntObjPredicate<T> consumer)
      Runs the specified operation on all blocks in the cuboid specified by the parameters. The iteration count is equal to the reported block count.
      Parameters:
      pointOne - One corner of the cube
      pointTwo - The opposite corner (to pointOne) of the cube
      consumer - The operation to execute on each of the coordinates' values
    • forEachBlock

      public static <T> boolean forEachBlock(@Nonnull org.joml.Vector3i pointOne, @Nonnull org.joml.Vector3i pointTwo, int thickness, boolean cappedTop, boolean cappedBottom, boolean hollow, T t, @Nonnull TriIntObjPredicate<T> consumer)
      Runs the specified operation on all blocks in the cuboid specified by the parameters. The iteration count is equal to the reported block count.
      Parameters:
      pointOne - One corner of the cube
      pointTwo - The opposite corner (to pointOne) of the cube
      thickness - The thickness of the hollow cuboid. Must be greater 0.
      cappedTop - A flag to control whether the end(s) of the hollow shape is closed on the top (true) or open (false).
      cappedBottom - A flag to control whether the end(s) of the hollow shape is closed on the bottom (true) or open (false).
      hollow - A flag to only operate on the inside of the cube based on thickness, leaving the walls alone, and operating on the inside
      consumer - The operation to execute on each of the coordinates' values