Record Class StatePropertiesPredicate.RangedMatcher
java.lang.Object
java.lang.Record
net.minecraft.advancements.critereon.StatePropertiesPredicate.RangedMatcher
- All Implemented Interfaces:
StatePropertiesPredicate.ValueMatcher
- Enclosing class:
StatePropertiesPredicate
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final com.mojang.serialization.Codec<StatePropertiesPredicate.RangedMatcher> The field for themaxValuerecord component.The field for theminValuerecord component.static final StreamCodec<io.netty.buffer.ByteBuf, StatePropertiesPredicate.RangedMatcher> -
Constructor Summary
ConstructorsConstructorDescriptionRangedMatcher(Optional<String> minValue, Optional<String> maxValue) Creates an instance of aRangedMatcherrecord class. -
Method Summary
Modifier and TypeMethodDescriptionfinal booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.<T extends Comparable<T>>
booleanmatch(StateHolder<?, ?> p_298772_, Property<T> p_298371_) maxValue()Returns the value of themaxValuerecord component.minValue()Returns the value of theminValuerecord component.final StringtoString()Returns a string representation of this record class.
-
Field Details
-
minValue
The field for theminValuerecord component. -
maxValue
The field for themaxValuerecord component. -
CODEC
-
STREAM_CODEC
public static final StreamCodec<io.netty.buffer.ByteBuf,StatePropertiesPredicate.RangedMatcher> STREAM_CODEC
-
-
Constructor Details
-
RangedMatcher
Creates an instance of aRangedMatcherrecord class.- Parameters:
minValue- the value for theminValuerecord componentmaxValue- the value for themaxValuerecord component
-
-
Method Details
-
match
- Specified by:
matchin interfaceStatePropertiesPredicate.ValueMatcher
-
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). -
minValue
Returns the value of theminValuerecord component.- Returns:
- the value of the
minValuerecord component
-
maxValue
Returns the value of themaxValuerecord component.- Returns:
- the value of the
maxValuerecord component
-