Record Class StatePropertiesPredicate.PropertyMatcher
java.lang.Object
java.lang.Record
net.minecraft.advancements.critereon.StatePropertiesPredicate.PropertyMatcher
- Enclosing class:
- StatePropertiesPredicate
static record StatePropertiesPredicate.PropertyMatcher(String name, StatePropertiesPredicate.ValueMatcher valueMatcher)
extends Record
- 
Field SummaryFieldsModifier and TypeFieldDescriptionprivate final StringThe field for thenamerecord component.private final StatePropertiesPredicate.ValueMatcherThe field for thevalueMatcherrecord component.
- 
Constructor SummaryConstructorsConstructorDescriptionPropertyMatcher(String name, StatePropertiesPredicate.ValueMatcher valueMatcher) Creates an instance of aPropertyMatcherrecord class.
- 
Method SummaryModifier and TypeMethodDescriptioncheckState(StateDefinition<?, ?> p_67722_) final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.<S extends StateHolder<?,S>> 
 booleanmatch(StateDefinition<?, S> p_67719_, S p_67720_) name()Returns the value of thenamerecord component.final StringtoString()Returns a string representation of this record class.Returns the value of thevalueMatcherrecord component.
- 
Field Details- 
nameThe field for thenamerecord component.
- 
valueMatcherThe field for thevalueMatcherrecord component.
 
- 
- 
Constructor Details- 
PropertyMatcherPropertyMatcher(String name, StatePropertiesPredicate.ValueMatcher valueMatcher) Creates an instance of aPropertyMatcherrecord class.- Parameters:
- name- the value for the- namerecord component
- valueMatcher- the value for the- valueMatcherrecord component
 
 
- 
- 
Method Details- 
match
- 
checkState
- 
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).
- 
nameReturns the value of thenamerecord component.- Returns:
- the value of the namerecord component
 
- 
valueMatcherReturns the value of thevalueMatcherrecord component.- Returns:
- the value of the valueMatcherrecord component
 
 
-