public class StatePredicate extends Object
Modifier and Type | Class and Description |
---|---|
static class |
StatePredicate.Builder |
(package private) static class |
StatePredicate.Condition |
(package private) static class |
StatePredicate.ExactValueCondition |
(package private) static class |
StatePredicate.RangedValueCondition |
Modifier and Type | Field and Description |
---|---|
static StatePredicate |
ANY |
private List<StatePredicate.Condition> |
conditions |
Modifier | Constructor and Description |
---|---|
private |
StatePredicate(List<StatePredicate.Condition> testers) |
Modifier and Type | Method and Description |
---|---|
private static String |
asNullableString(JsonElement json) |
void |
check(StateManager<?,?> factory,
Consumer<String> reporter) |
private static StatePredicate.Condition |
createPredicate(String key,
JsonElement json) |
static StatePredicate |
fromJson(JsonElement json) |
boolean |
test(BlockState state) |
boolean |
test(FluidState state) |
<S extends State<?,S>> |
test(StateManager<?,S> stateManager,
S container) |
JsonElement |
toJson() |
public static final StatePredicate ANY
private final List<StatePredicate.Condition> conditions
private StatePredicate(List<StatePredicate.Condition> testers)
private static StatePredicate.Condition createPredicate(String key, JsonElement json)
@Nullable private static String asNullableString(JsonElement json)
public <S extends State<?,S>> boolean test(StateManager<?,S> stateManager, S container)
public boolean test(BlockState state)
public boolean test(FluidState state)
public void check(StateManager<?,?> factory, Consumer<String> reporter)
public static StatePredicate fromJson(@Nullable JsonElement json)
public JsonElement toJson()