Record Class StatePropertiesPredicate
java.lang.Object
java.lang.Record
net.minecraft.advancements.critereon.StatePropertiesPredicate
public record StatePropertiesPredicate(List<StatePropertiesPredicate.PropertyMatcher> properties)
extends Record
- 
Nested Class SummaryNested ClassesModifier and TypeClassDescriptionstatic class(package private) static final record(package private) static final record(package private) static final record(package private) static interface
- 
Field SummaryFieldsModifier and TypeFieldDescriptionstatic final com.mojang.serialization.Codec<StatePropertiesPredicate>private final List<StatePropertiesPredicate.PropertyMatcher>The field for thepropertiesrecord component.private static final com.mojang.serialization.Codec<List<StatePropertiesPredicate.PropertyMatcher>>
- 
Constructor SummaryConstructorsConstructorDescriptionCreates an instance of aStatePropertiesPredicaterecord class.
- 
Method SummaryModifier and TypeMethodDescriptioncheckState(StateDefinition<?, ?> p_299112_) voidcheckState(StateDefinition<?, ?> p_67673_, Consumer<String> p_67674_) final booleanIndicates whether some other object is "equal to" this one.static Optional<StatePropertiesPredicate>fromJson(com.google.gson.JsonElement p_67680_) final inthashCode()Returns a hash code value for this object.booleanmatches(BlockState p_67668_) <S extends StateHolder<?,S>> 
 booleanmatches(StateDefinition<?, S> p_67670_, S p_67671_) booleanmatches(FluidState p_67685_) Returns the value of thepropertiesrecord component.com.google.gson.JsonElementfinal StringtoString()Returns a string representation of this record class.
- 
Field Details- 
propertiesThe field for thepropertiesrecord component.
- 
PROPERTIES_CODECprivate static final com.mojang.serialization.Codec<List<StatePropertiesPredicate.PropertyMatcher>> PROPERTIES_CODEC
- 
CODEC
 
- 
- 
Constructor Details- 
StatePropertiesPredicateCreates an instance of aStatePropertiesPredicaterecord class.- Parameters:
- properties- the value for the- propertiesrecord component
 
 
- 
- 
Method Details- 
matches
- 
matches
- 
matches
- 
checkState
- 
checkState
- 
fromJsonpublic static Optional<StatePropertiesPredicate> fromJson(@Nullable com.google.gson.JsonElement p_67680_) 
- 
serializeToJsonpublic com.google.gson.JsonElement serializeToJson()
- 
toStringReturns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components.
- 
hashCodepublic final int hashCode()Returns a hash code value for this object. The value is derived from the hash code of each of the record components.
- 
equalsIndicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. All components in this record class are compared withObjects::equals(Object,Object).
- 
propertiesReturns the value of thepropertiesrecord component.- Returns:
- the value of the propertiesrecord component
 
 
-