Package net.minecraft
Class BlockUtil
java.lang.Object
net.minecraft.BlockUtil
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic class
static class
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic BlockUtil.FoundRectangle
getLargestRectangleAround
(BlockPos centerPos, Direction.Axis axis1, int max1, Direction.Axis axis2, int max2, Predicate<BlockPos> posPredicate) Finds the rectangle with the largest area containing centerPos within the blocks specified by the predicateprivate static int
getLimit
(Predicate<BlockPos> posPredicate, BlockPos.MutableBlockPos centerPos, Direction direction, int max) 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[] heights) Finds the largest rectangle within the array of heightsgetTopConnectedBlock
(BlockGetter getter, BlockPos pos, Block baseBlock, Direction direction, Block endBlock)
-
Constructor Details
-
BlockUtil
public BlockUtil()
-
-
Method Details
-
getLargestRectangleAround
public static BlockUtil.FoundRectangle getLargestRectangleAround(BlockPos centerPos, Direction.Axis axis1, int max1, Direction.Axis axis2, int max2, Predicate<BlockPos> posPredicate) Finds the rectangle with the largest area containing centerPos within the blocks specified by the predicate -
getLimit
private static int getLimit(Predicate<BlockPos> posPredicate, BlockPos.MutableBlockPos centerPos, Direction direction, int max) 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[] heights) Finds the largest rectangle within the array of heights -
getTopConnectedBlock
-