Record Class PlayerPredicate.StatMatcher<T>
java.lang.Object
java.lang.Record
net.minecraft.advancements.critereon.PlayerPredicate.StatMatcher<T>
- Enclosing class:
PlayerPredicate
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final com.mojang.serialization.Codec<PlayerPredicate.StatMatcher<?>> private final MinMaxBounds.IntsThe field for therangerecord component.The field for thestatrecord component.The field for thetyperecord component.The field for thevaluerecord component. -
Constructor Summary
ConstructorsConstructorDescriptionStatMatcher(StatType<T> p_299207_, Holder<T> p_298208_, MinMaxBounds.Ints p_299102_) StatMatcher(StatType<T> type, Holder<T> value, MinMaxBounds.Ints range, Supplier<Stat<T>> stat) Creates an instance of aStatMatcherrecord class. -
Method Summary
Modifier and TypeMethodDescriptionprivate static <T> com.mojang.serialization.MapCodec<PlayerPredicate.StatMatcher<T>> createTypedCodec(StatType<T> p_299086_) final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.booleanmatches(StatsCounter p_298568_) range()Returns the value of therangerecord component.stat()Returns the value of thestatrecord component.final StringtoString()Returns a string representation of this record class.type()Returns the value of thetyperecord component.value()Returns the value of thevaluerecord component.
-
Field Details
-
type
The field for thetyperecord component. -
value
The field for thevaluerecord component. -
range
The field for therangerecord component. -
stat
The field for thestatrecord component. -
CODEC
-
-
Constructor Details
-
StatMatcher
-
StatMatcher
Creates an instance of aStatMatcherrecord class.- Parameters:
type- the value for thetyperecord componentvalue- the value for thevaluerecord componentrange- the value for therangerecord componentstat- the value for thestatrecord component
-
-
Method Details
-
createTypedCodec
private static <T> com.mojang.serialization.MapCodec<PlayerPredicate.StatMatcher<T>> createTypedCodec(StatType<T> p_299086_) -
matches
-
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). -
type
Returns the value of thetyperecord component.- Returns:
- the value of the
typerecord component
-
value
Returns the value of thevaluerecord component.- Returns:
- the value of the
valuerecord component
-
range
Returns the value of therangerecord component.- Returns:
- the value of the
rangerecord component
-
stat
Returns the value of thestatrecord component.- Returns:
- the value of the
statrecord component
-