Record Class PlayerPredicate.StatMatcher<T>
java.lang.Object
java.lang.Record
net.minecraft.advancements.criterion.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
ConstructorsModifierConstructorDescriptionStatMatcher(StatType<T> type, Holder<T> value, MinMaxBounds.Ints range) privateStatMatcher(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> type) final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.booleanmatches(StatsCounter counter) 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
-
value
-
range
The field for therangerecord component. -
stat
-
CODEC
-
-
Constructor Details
-
StatMatcher
-
StatMatcher
private StatMatcher(StatType<T> type, Holder<T> value, MinMaxBounds.Ints range, Supplier<Stat<T>> stat) 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> type) -
matches
-
toString
-
hashCode
-
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
-
value
-
range
Returns the value of therangerecord component.- Returns:
- the value of the
rangerecord component
-
stat
-