Contents
- Description
- Constructor Summary
- Method Summary
- Constructor Details
- Method Details
- forEachBlock(int, int, int, int, int, int, T, TriIntObjPredicate)
- forEachBlock(int, int, int, int, int, int, boolean, boolean, T, TriIntObjPredicate)
- forEachBlock(int, int, int, int, int, int, int, T, TriIntObjPredicate)
- forEachBlock(int, int, int, int, int, int, int, boolean, T, TriIntObjPredicate)
- forEachBlock(int, int, int, int, int, int, int, boolean, boolean, boolean, T, TriIntObjPredicate)
- forEachBlockInverted(int, int, int, int, int, int, T, TriIntObjPredicate)
- forEachBlockInverted(int, int, int, int, int, int, boolean, boolean, T, TriIntObjPredicate)
- forEachBlockInverted(int, int, int, int, int, int, int, T, TriIntObjPredicate)
- forEachBlockInverted(int, int, int, int, int, int, int, boolean, T, TriIntObjPredicate)
- forEachBlockInverted(int, int, int, int, int, int, int, boolean, boolean, boolean, T, TriIntObjPredicate)
Class BlockConeUtil
java.lang.Object
com.hypixel.hytale.math.block.BlockConeUtil
- Since:
- 04.02.2018
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic <T> voidforEachBlock(int originX, int originY, int originZ, int radiusX, int height, int radiusZ, boolean evenXZ, boolean evenH, T t, TriIntObjPredicate<T> consumer) Runs the specified operation on all blocks in the cone specified by the parameters.static <T> voidforEachBlock(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> voidforEachBlock(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 sphere specified by the parameters.static <T> voidforEachBlock(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 sphere specified by the parameters.static <T> voidforEachBlock(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.static <T> voidforEachBlockInverted(int originX, int originY, int originZ, int radiusX, int height, int radiusZ, boolean evenXZ, boolean evenH, T t, TriIntObjPredicate<T> consumer) Runs the specified operation on all blocks in the inverted cone specified by the parameters.static <T> voidforEachBlockInverted(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> voidforEachBlockInverted(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 sphere specified by the parameters.static <T> voidforEachBlockInverted(int originX, int originY, int originZ, int radiusX, int height, int radiusZ, int thickness, T t, TriIntObjPredicate<T> consumer) static <T> voidforEachBlockInverted(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.
-
Constructor Details
-
BlockConeUtil
public BlockConeUtil()
-
-
Method Details
-
forEachBlock
public static <T> void 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 cone on the X axisoriginY- The bottom of the cone on the Y axisoriginZ- The center of the cone on the Z axisradiusX- The radius of the cone on the X axis. Must be greater than 0.height- The height of the cone on the Y axis. Must be greater than 0.radiusZ- The radius of the cone on the Z axis. Must be greater than 0.consumer- The operation to execute on each of the coordinates' values
-
forEachBlock
public static <T> void forEachBlock(int originX, int originY, int originZ, int radiusX, int height, int radiusZ, boolean evenXZ, boolean evenH, T t, @Nonnull TriIntObjPredicate<T> consumer) Runs the specified operation on all blocks in the cone specified by the parameters. The algorithm does not iterate over blocks outside the cone. The iteration count is equal to the reported block count. When evenXZ/evenH are true, shifts sampling by 0.5 to produce even-width shapes.- Parameters:
originX- The center of the cone on the X axisoriginY- The bottom of the cone on the Y axisoriginZ- The center of the cone on the Z axisradiusX- The radius of the cone on the X axis. Must be greater than 0.height- The height of the cone on the Y axis. Must be greater than 0.radiusZ- The radius of the cone on the Z axis. Must be greater than 0.evenXZ- Whether the horizontal size is even (shifts sampling by 0.5)evenH- Whether the vertical size is even (shifts sampling by 0.5)consumer- The operation to execute on each of the coordinates' values
-
forEachBlock
public static <T> void 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 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 cone on the X axisoriginY- The bottom of the cone on the Y axisoriginZ- The center of the cone on the Z axisradiusX- The radius of the cone on the X axis. Must be greater than 0.height- The height of the cone on the Y axis. Must be greater than 0.radiusZ- The radius of the cone on the Z axis. Must be greater than 0.thickness- The thickness of the hollow cone. Must be greater 0.consumer- The operation to execute on each of the coordinates' values
-
forEachBlock
public static <T> void 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 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 cone on the X axisoriginY- The bottom of the cone on the Y axisoriginZ- The center of the cone on the Z axisradiusX- The radius of the cone on the X axis. Must be greater than 0.height- The height of the cone on the Y axis. Must be greater than 0.radiusZ- The radius of the cone on the Z axis. Must be greater than 0.thickness- The thickness of the hollow cone. 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> void 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) -
forEachBlockInverted
public static <T> void forEachBlockInverted(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 cone on the X axisoriginY- The bottom of the cone on the Y axisoriginZ- The center of the cone on the Z axisradiusX- The radius of the cone on the X axis. Must be greater than 0.height- The height of the cone on the Y axis. Must be greater than 0.radiusZ- The radius of the cone on the Z axis. Must be greater than 0.consumer- The operation to execute on each of the coordinates' values
-
forEachBlockInverted
public static <T> void forEachBlockInverted(int originX, int originY, int originZ, int radiusX, int height, int radiusZ, boolean evenXZ, boolean evenH, T t, @Nonnull TriIntObjPredicate<T> consumer) Runs the specified operation on all blocks in the inverted cone specified by the parameters. When evenXZ/evenH are true, shifts sampling by 0.5 to produce even-width shapes.- Parameters:
originX- The center of the cone on the X axisoriginY- The bottom of the cone on the Y axisoriginZ- The center of the cone on the Z axisradiusX- The radius of the cone on the X axis. Must be greater than 0.height- The height of the cone on the Y axis. Must be greater than 0.radiusZ- The radius of the cone on the Z axis. Must be greater than 0.evenXZ- Whether the horizontal size is even (shifts sampling by 0.5)evenH- Whether the vertical size is even (shifts sampling by 0.5)consumer- The operation to execute on each of the coordinates' values
-
forEachBlockInverted
public static <T> void forEachBlockInverted(int originX, int originY, int originZ, int radiusX, int height, int radiusZ, int thickness, T t, @Nonnull TriIntObjPredicate<T> consumer) -
forEachBlockInverted
public static <T> void forEachBlockInverted(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 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 cone on the X axisoriginY- The bottom of the cone on the Y axisoriginZ- The center of the cone on the Z axisradiusX- The radius of the cone on the X axis. Must be greater than 0.height- The height of the cone on the Y axis. Must be greater than 0.radiusZ- The radius of the cone on the Z axis. Must be greater than 0.thickness- The thickness of the hollow cone. 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
-
forEachBlockInverted
public static <T> void forEachBlockInverted(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)
-