Class OrderedBlockMatcher
java.lang.Object
net.minecraft.world.level.blockscan.BlockMatcher
net.minecraft.world.level.blockscan.OrderedBlockMatcher
-
Field Summary
FieldsFields inherited from class BlockMatcher
level, NO_POSITION_PREDICATE, positionPredicate, statePredicate -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected booleananyMatched(Predicate<BlockState> statePredicate, BiPredicate<BlockState, BlockPos> positionPredicate) booleanatLeastMatched(int n) filterPosition(BiPredicate<BlockState, BlockPos> predicate) Neo: Filter against the state and position context, after the states are filtered.filterState(Predicate<BlockState> predicate) findFirst(BiPredicate<BlockPos, BlockState> predicate) voidforEach(BiConsumer<BlockPos, BlockState> consumer) booleanforEachUntil(BlockStateConsumer consumer) Methods inherited from class BlockMatcher
allMatched, anyMatched, anyMatched, atMostMatched, noneMatched
-
Field Details
-
positions
-
-
Constructor Details
-
OrderedBlockMatcher
-
-
Method Details
-
filterPos
-
filterState
- Overrides:
filterStatein classBlockMatcher
-
filterPosition
Description copied from class:BlockMatcherNeo: Filter against the state and position context, after the states are filtered. This is only called for positions that the block state filter did not reject.
All filters registered using this method are applied in sequence, so only the intersection of all filters are matched.
The position passed to this method may be mutable; do not modify it or store it directly without first making it immutable.
For filtering out states without reference to the position, prefer using
BlockMatcher.filterState(Predicate).- Overrides:
filterPositionin classBlockMatcher- Parameters:
predicate- a filter based on state and (mutable) position- Returns:
- this matcher, for chaining
-
atLeastMatched
public boolean atLeastMatched(int n) - Specified by:
atLeastMatchedin classBlockMatcher
-
anyMatched
protected boolean anyMatched(Predicate<BlockState> statePredicate, BiPredicate<BlockState, BlockPos> positionPredicate) - Specified by:
anyMatchedin classBlockMatcher
-
forEach
- Specified by:
forEachin classBlockMatcher
-
forEachUntil
- Specified by:
forEachUntilin classBlockMatcher
-
findFirst
-
findFirst
-