Class BlockUtil
java.lang.Object
net.minecraft.util.BlockUtil
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classstatic class -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic BlockUtil.FoundRectanglegetLargestRectangleAround(BlockPos center, Direction.Axis axis1, int limit1, Direction.Axis axis2, int limit2, Predicate<BlockPos> test) Finds the rectangle with the largest area containing centerPos within the blocks specified by the predicateprivate static intgetLimit(Predicate<BlockPos> test, BlockPos.MutableBlockPos pos, Direction direction, int limit) Finds the distance we can travel in the given direction while the predicate returns true(package private) static com.mojang.datafixers.util.Pair<BlockUtil.IntBounds, Integer> getMaxRectangleLocation(int[] columns) Finds the largest rectangle within the array of heightsgetTopConnectedBlock(BlockGetter level, BlockPos pos, Block bodyBlock, Direction growthDirection, Block headBlock)
-
Constructor Details
-
BlockUtil
public BlockUtil()
-
-
Method Details
-
getLargestRectangleAround
public static BlockUtil.FoundRectangle getLargestRectangleAround(BlockPos center, Direction.Axis axis1, int limit1, Direction.Axis axis2, int limit2, Predicate<BlockPos> test) Finds the rectangle with the largest area containing centerPos within the blocks specified by the predicate -
getLimit
private static int getLimit(Predicate<BlockPos> test, BlockPos.MutableBlockPos pos, Direction direction, int limit) Finds the distance we can travel in the given direction while the predicate returns true -
getMaxRectangleLocation
static com.mojang.datafixers.util.Pair<BlockUtil.IntBounds, Integer> getMaxRectangleLocation(int[] columns) Finds the largest rectangle within the array of heights -
getTopConnectedBlock
-