Class BlockCylinderUtil

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

public class BlockCylinderUtil extends Object
Since:
04.02.2018
  • 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 evenH, T t, TriIntObjPredicate<T> consumer)
     
    static <T> boolean
    forEachBlock(int originX, int originY, int originZ, int radiusX, int height, int radiusZ, int thickness, boolean capped, boolean evenXZ, boolean evenH, T t, TriIntObjPredicate<T> consumer)
     
    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 hollow sphere 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 hollow sphere 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 sphere specified by the parameters.

    Methods inherited from class Object

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

    • BlockCylinderUtil

      public BlockCylinderUtil()
  • 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 sphere specified by the parameters. The algorithm does not iterate over blocks outside the sphere. The iteration count is equal to the reported block count.
      Parameters:
      originX - The center of the cylinder on the X axis
      originY - The center of the cylinder on the Y axis
      originZ - The center of the cylinder on the Z axis
      radiusX - The radius of the cylinder on the X axis. Must be greater than 0.
      height - The height of the cylinder on the Y axis. Must be greater than 0.
      radiusZ - The radius of the cylinder 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 evenH, 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 hollow sphere specified by the parameters.
      Parameters:
      originX - The center of the cylinder on the X axis
      originY - The center of the cylinder on the Y axis
      originZ - The center of the cylinder on the Z axis
      radiusX - The radius of the cylinder on the X axis. Must be greater than 0.
      height - The height of the cylinder on the Y axis. Must be greater than 0.
      radiusZ - The radius of the cylinder on the Z axis. Must be greater than 0.
      thickness - The thickness of the hollow cylinder. 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 hollow sphere specified by the parameters.
      Parameters:
      originX - The center of the cylinder on the X axis
      originY - The center of the cylinder on the Y axis
      originZ - The center of the cylinder on the Z axis
      radiusX - The radius of the cylinder on the X axis. Must be greater than 0.
      height - The height of the cylinder on the Y axis. Must be greater than 0.
      radiusZ - The radius of the cylinder on the Z axis. Must be greater than 0.
      thickness - The thickness of the hollow cylinder. 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 capped, boolean evenXZ, boolean evenH, T t, @Nonnull TriIntObjPredicate<T> consumer)