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 Summary
Modifier and TypeFieldDescriptionprivate final String
The field for thename
record component.static final StreamCodec
<io.netty.buffer.ByteBuf, StatePropertiesPredicate.PropertyMatcher> private final StatePropertiesPredicate.ValueMatcher
The field for thevalueMatcher
record component. -
Constructor Summary
ConstructorDescriptionPropertyMatcher
(String name, StatePropertiesPredicate.ValueMatcher valueMatcher) Creates an instance of aPropertyMatcher
record class. -
Method Summary
Modifier and TypeMethodDescriptioncheckState
(StateDefinition<?, ?> p_67722_) final boolean
Indicates whether some other object is "equal to" this one.final int
hashCode()
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 thename
record component.final String
toString()
Returns a string representation of this record class.Returns the value of thevalueMatcher
record component.
-
Field Details
-
name
The field for thename
record component. -
valueMatcher
The field for thevalueMatcher
record component. -
STREAM_CODEC
public static final StreamCodec<io.netty.buffer.ByteBuf,StatePropertiesPredicate.PropertyMatcher> STREAM_CODEC
-
-
Constructor Details
-
PropertyMatcher
PropertyMatcher(String name, StatePropertiesPredicate.ValueMatcher valueMatcher) Creates an instance of aPropertyMatcher
record class.- Parameters:
name
- the value for thename
record componentvalueMatcher
- the value for thevalueMatcher
record component
-
-
Method Details
-
match
-
checkState
-
toString
Returns 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. -
hashCode
public 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. -
equals
Indicates 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)
. -
name
Returns the value of thename
record component.- Returns:
- the value of the
name
record component
-
valueMatcher
Returns the value of thevalueMatcher
record component.- Returns:
- the value of the
valueMatcher
record component
-