Class BlockScanUtils
java.lang.Object
net.minecraft.world.level.blockscan.BlockScanUtils
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescription(package private) static booleanfindBlocks(LevelReader level, BlockPos from, BlockPos to, Predicate<BlockState> predicate, BiPredicate<BlockState, BlockPos> positionPredicate, BlockStateConsumer consumer) Neo: Add overload offindBlocks(LevelReader, BlockPos, BlockPos, Predicate, BlockStateConsumer)which accepts a position-based predicate (evaluated only if the state predicate accepts)(package private) static booleanfindBlocks(LevelReader level, BlockPos from, BlockPos to, Predicate<BlockState> predicate, BlockStateConsumer consumer) static booleanfindBlocksInSection(LevelChunkSection section, BlockPos origin, int fromX, int fromY, int fromZ, int toX, int toY, int toZ, Predicate<BlockState> predicate, BiPredicate<BlockState, BlockPos> positionPredicate, BlockStateConsumer consumer) Neo: Add overload offindBlocksInSection(LevelChunkSection, BlockPos, int, int, int, int, int, int, Predicate, BlockStateConsumer)which accepts a position-based predicate (evaluated only if the state predicate accepts)static booleanfindBlocksInSection(LevelChunkSection section, BlockPos origin, int fromX, int fromY, int fromZ, int toX, int toY, int toZ, Predicate<BlockState> predicate, BlockStateConsumer consumer) (package private) static booleanfindBlocksWithCache(LevelReader level, Iterable<BlockPos> positions, Predicate<BlockState> predicate, BiPredicate<BlockState, BlockPos> positionPredicate, BlockStateConsumer consumer) Neo: Add overload offindBlocksWithCache(LevelReader, Iterable, Predicate, BlockStateConsumer)which accepts a position-based predicate (evaluated only if the state predicate accepts)(package private) static booleanfindBlocksWithCache(LevelReader level, Iterable<BlockPos> positions, Predicate<BlockState> predicate, BlockStateConsumer consumer) private static booleansectionBasedScan(LevelReader level, int minX, int minY, int minZ, int maxX, int maxY, int maxZ, Predicate<BlockState> predicate, BiPredicate<BlockState, BlockPos> positionPredicate, BlockStateConsumer consumer) Neo: Add overload ofsectionBasedScan(LevelReader, int, int, int, int, int, int, Predicate, BlockStateConsumer)which accepts a position-based predicate (evaluated only if the state predicate accepts)private static booleansectionBasedScan(LevelReader level, int minX, int minY, int minZ, int maxX, int maxY, int maxZ, Predicate<BlockState> predicate, BlockStateConsumer consumer)
-
Constructor Details
-
BlockScanUtils
public BlockScanUtils()
-
-
Method Details
-
findBlocks
static boolean findBlocks(LevelReader level, BlockPos from, BlockPos to, Predicate<BlockState> predicate, BlockStateConsumer consumer) -
findBlocks
static boolean findBlocks(LevelReader level, BlockPos from, BlockPos to, Predicate<BlockState> predicate, BiPredicate<BlockState, BlockPos> positionPredicate, BlockStateConsumer consumer) Neo: Add overload offindBlocks(LevelReader, BlockPos, BlockPos, Predicate, BlockStateConsumer)which accepts a position-based predicate (evaluated only if the state predicate accepts) -
sectionBasedScan
private static boolean sectionBasedScan(LevelReader level, int minX, int minY, int minZ, int maxX, int maxY, int maxZ, Predicate<BlockState> predicate, BlockStateConsumer consumer) -
sectionBasedScan
private static boolean sectionBasedScan(LevelReader level, int minX, int minY, int minZ, int maxX, int maxY, int maxZ, Predicate<BlockState> predicate, BiPredicate<BlockState, BlockPos> positionPredicate, BlockStateConsumer consumer) Neo: Add overload ofsectionBasedScan(LevelReader, int, int, int, int, int, int, Predicate, BlockStateConsumer)which accepts a position-based predicate (evaluated only if the state predicate accepts) -
findBlocksInSection
public static boolean findBlocksInSection(LevelChunkSection section, BlockPos origin, int fromX, int fromY, int fromZ, int toX, int toY, int toZ, Predicate<BlockState> predicate, BlockStateConsumer consumer) -
findBlocksInSection
public static boolean findBlocksInSection(LevelChunkSection section, BlockPos origin, int fromX, int fromY, int fromZ, int toX, int toY, int toZ, Predicate<BlockState> predicate, BiPredicate<BlockState, BlockPos> positionPredicate, BlockStateConsumer consumer) Neo: Add overload offindBlocksInSection(LevelChunkSection, BlockPos, int, int, int, int, int, int, Predicate, BlockStateConsumer)which accepts a position-based predicate (evaluated only if the state predicate accepts) -
findBlocksWithCache
static boolean findBlocksWithCache(LevelReader level, Iterable<BlockPos> positions, Predicate<BlockState> predicate, BlockStateConsumer consumer) -
findBlocksWithCache
static boolean findBlocksWithCache(LevelReader level, Iterable<BlockPos> positions, Predicate<BlockState> predicate, BiPredicate<BlockState, BlockPos> positionPredicate, BlockStateConsumer consumer) Neo: Add overload offindBlocksWithCache(LevelReader, Iterable, Predicate, BlockStateConsumer)which accepts a position-based predicate (evaluated only if the state predicate accepts)
-