Package net.minecraft.block.pattern
Class BlockStateMatcher
- java.lang.Object
-
- net.minecraft.block.pattern.BlockStateMatcher
-
- All Implemented Interfaces:
java.util.function.Predicate<BlockState>
public class BlockStateMatcher extends java.lang.Object implements java.util.function.Predicate<BlockState>
-
-
Field Summary
Fields Modifier and Type Field Description static java.util.function.Predicate<BlockState>
ANY
private StateContainer<Block,BlockState>
definition
private java.util.Map<Property<?>,java.util.function.Predicate<java.lang.Object>>
properties
-
Constructor Summary
Constructors Modifier Constructor Description private
BlockStateMatcher(StateContainer<Block,BlockState> p_i45653_1_)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description protected <T extends java.lang.Comparable<T>>
booleanapplies(BlockState p_185927_1_, Property<T> p_185927_2_, java.util.function.Predicate<java.lang.Object> p_185927_3_)
static BlockStateMatcher
forBlock(Block p_177638_0_)
boolean
test(BlockState p_test_1_)
<V extends java.lang.Comparable<V>>
BlockStateMatcherwhere(Property<V> p_201028_1_, java.util.function.Predicate<java.lang.Object> p_201028_2_)
-
-
-
Field Detail
-
ANY
public static final java.util.function.Predicate<BlockState> ANY
-
definition
private final StateContainer<Block,BlockState> definition
-
properties
private final java.util.Map<Property<?>,java.util.function.Predicate<java.lang.Object>> properties
-
-
Constructor Detail
-
BlockStateMatcher
private BlockStateMatcher(StateContainer<Block,BlockState> p_i45653_1_)
-
-
Method Detail
-
forBlock
public static BlockStateMatcher forBlock(Block p_177638_0_)
-
test
public boolean test(@Nullable BlockState p_test_1_)
- Specified by:
test
in interfacejava.util.function.Predicate<BlockState>
-
applies
protected <T extends java.lang.Comparable<T>> boolean applies(BlockState p_185927_1_, Property<T> p_185927_2_, java.util.function.Predicate<java.lang.Object> p_185927_3_)
-
where
public <V extends java.lang.Comparable<V>> BlockStateMatcher where(Property<V> p_201028_1_, java.util.function.Predicate<java.lang.Object> p_201028_2_)
-
-