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
FieldsModifier and TypeFieldDescriptionprivate final StringThe field for thenamerecord component.static final StreamCodec<io.netty.buffer.ByteBuf, StatePropertiesPredicate.PropertyMatcher> private final StatePropertiesPredicate.ValueMatcherThe field for thevalueMatcherrecord component. -
Constructor Summary
ConstructorsConstructorDescriptionPropertyMatcher(String name, StatePropertiesPredicate.ValueMatcher valueMatcher) Creates an instance of aPropertyMatcherrecord class. -
Method Summary
Modifier 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
-
name
The field for thenamerecord component. -
valueMatcher
The field for thevalueMatcherrecord 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 aPropertyMatcherrecord class.- Parameters:
name- the value for thenamerecord componentvalueMatcher- the value for thevalueMatcherrecord 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 thenamerecord component.- Returns:
- the value of the
namerecord component
-
valueMatcher
Returns the value of thevalueMatcherrecord component.- Returns:
- the value of the
valueMatcherrecord component
-