public class BlockStatePredicate extends Object implements Predicate<BlockState>
Modifier and Type | Field and Description |
---|---|
static Predicate<BlockState> |
ANY |
private StateManager<Block,BlockState> |
manager |
private Map<Property<?>,Predicate<Object>> |
propertyTests |
Modifier | Constructor and Description |
---|---|
private |
BlockStatePredicate(StateManager<Block,BlockState> manager) |
Modifier and Type | Method and Description |
---|---|
static BlockStatePredicate |
forBlock(Block block) |
boolean |
test(BlockState blockState) |
protected <T extends Comparable<T>> |
testProperty(BlockState blockState,
Property<T> property,
Predicate<Object> predicate) |
<V extends Comparable<V>> |
with(Property<V> property,
Predicate<Object> predicate) |
public static final Predicate<BlockState> ANY
private final StateManager<Block,BlockState> manager
private BlockStatePredicate(StateManager<Block,BlockState> manager)
public static BlockStatePredicate forBlock(Block block)
public boolean test(@Nullable BlockState blockState)
test
in interface Predicate<BlockState>
protected <T extends Comparable<T>> boolean testProperty(BlockState blockState, Property<T> property, Predicate<Object> predicate)
public <V extends Comparable<V>> BlockStatePredicate with(Property<V> property, Predicate<Object> predicate)