Record Class PlayerPredicate.StatMatcher<T>
java.lang.Object
java.lang.Record
net.minecraft.advancements.critereon.PlayerPredicate.StatMatcher<T>
- Enclosing class:
- PlayerPredicate
- 
Field SummaryFieldsModifier 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 SummaryConstructorsConstructorDescriptionStatMatcher(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 SummaryModifier and TypeMethodDescriptionprivate static <T> com.mojang.serialization.Codec<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- 
typeThe field for thetyperecord component.
- 
valueThe field for thevaluerecord component.
- 
rangeThe field for therangerecord component.
- 
statThe field for thestatrecord component.
- 
CODEC
 
- 
- 
Constructor Details- 
StatMatcher
- 
StatMatcherCreates an instance of aStatMatcherrecord class.- Parameters:
- type- the value for the- typerecord component
- value- the value for the- valuerecord component
- range- the value for the- rangerecord component
- stat- the value for the- statrecord component
 
 
- 
- 
Method Details- 
createTypedCodecprivate static <T> com.mojang.serialization.Codec<PlayerPredicate.StatMatcher<T>> createTypedCodec(StatType<T> p_299086_) 
- 
matches
- 
toStringReturns 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.
- 
hashCodepublic 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.
- 
equalsIndicates 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).
- 
typeReturns the value of thetyperecord component.- Returns:
- the value of the typerecord component
 
- 
valueReturns the value of thevaluerecord component.- Returns:
- the value of the valuerecord component
 
- 
rangeReturns the value of therangerecord component.- Returns:
- the value of the rangerecord component
 
- 
statReturns the value of thestatrecord component.- Returns:
- the value of the statrecord component
 
 
-