Contents
- Description
- Constructor Summary
- Method Summary
- Constructor Details
- Method Details
- forEachBlock(int, int, int, int, int, T, TriIntObjPredicate)
- forEachBlock(int, int, int, int, int, boolean, boolean, T, TriIntObjPredicate)
- forEachBlock(int, int, int, int, int, int, boolean, T, TriIntObjPredicate)
- forEachBlock(int, int, int, int, int, int, boolean, boolean, boolean, T, TriIntObjPredicate)
Class BlockTorusUtil
java.lang.Object
com.hypixel.hytale.math.block.BlockTorusUtil
Utility for iterating over blocks in a torus (donut) shape.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic <T> booleanforEachBlock(int originX, int originY, int originZ, int outerRadius, int minorRadius, boolean evenXZ, boolean evenY, T t, TriIntObjPredicate<T> consumer) Runs the specified operation on all blocks in the torus specified by the parameters.static <T> booleanforEachBlock(int originX, int originY, int originZ, int outerRadius, int minorRadius, int thickness, boolean capped, boolean evenXZ, boolean evenY, T t, TriIntObjPredicate<T> consumer) static <T> booleanforEachBlock(int originX, int originY, int originZ, int outerRadius, int minorRadius, int thickness, boolean capped, T t, TriIntObjPredicate<T> consumer) Runs the specified operation on all blocks in the hollow torus specified by the parameters.static <T> booleanforEachBlock(int originX, int originY, int originZ, int outerRadius, int minorRadius, T t, TriIntObjPredicate<T> consumer) Runs the specified operation on all blocks in the torus specified by the parameters.
-
Constructor Details
-
BlockTorusUtil
public BlockTorusUtil()
-
-
Method Details
-
forEachBlock
public static <T> boolean forEachBlock(int originX, int originY, int originZ, int outerRadius, int minorRadius, @Nullable T t, @Nonnull TriIntObjPredicate<T> consumer) Runs the specified operation on all blocks in the torus specified by the parameters.- Parameters:
originX- The center of the torus on the X axisoriginY- The center of the torus on the Y axisoriginZ- The center of the torus on the Z axisouterRadius- The total outer radius of the torus (width/2). Must be greater than 0.minorRadius- The radius of the tube itself (height/4). 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 outerRadius, int minorRadius, boolean evenXZ, boolean evenY, @Nullable T t, @Nonnull TriIntObjPredicate<T> consumer) Runs the specified operation on all blocks in the torus specified by the parameters. When evenXZ/evenY are true, shifts sampling by 0.5 to produce even-width shapes.- Parameters:
originX- The center of the torus on the X axisoriginY- The center of the torus on the Y axisoriginZ- The center of the torus on the Z axisouterRadius- The total outer radius of the torus (width/2). Must be greater than 0.minorRadius- The radius of the tube itself (height/4). Must be greater than 0.evenXZ- Whether the horizontal size is even (shifts sampling by 0.5)evenY- 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> boolean forEachBlock(int originX, int originY, int originZ, int outerRadius, int minorRadius, int thickness, boolean capped, @Nullable T t, @Nonnull TriIntObjPredicate<T> consumer) Runs the specified operation on all blocks in the hollow torus specified by the parameters.- Parameters:
originX- The center of the torus on the X axisoriginY- The center of the torus on the Y axisoriginZ- The center of the torus on the Z axisouterRadius- The total outer radius of the torus (width/2). Must be greater than 0.minorRadius- The radius of the tube itself (height/4). Must be greater than 0.thickness- The wall thickness of the hollow torus. 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 outerRadius, int minorRadius, int thickness, boolean capped, boolean evenXZ, boolean evenY, @Nullable T t, @Nonnull TriIntObjPredicate<T> consumer)
-