Record Class PlayerPredicate.StatMatcher<T>
java.lang.Object
java.lang.Record
net.minecraft.advancements.critereon.PlayerPredicate.StatMatcher<T>
- Enclosing class:
PlayerPredicate
-
Field Summary
Modifier and TypeFieldDescriptionstatic final com.mojang.serialization.Codec<PlayerPredicate.StatMatcher<?>>
private final MinMaxBounds.Ints
The field for therange
record component.The field for thestat
record component.The field for thetype
record component.The field for thevalue
record component. -
Constructor Summary
ConstructorDescriptionStatMatcher
(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 aStatMatcher
record class. -
Method Summary
Modifier and TypeMethodDescriptionprivate static <T> com.mojang.serialization.Codec<PlayerPredicate.StatMatcher<T>>
createTypedCodec
(StatType<T> p_299086_) final boolean
Indicates whether some other object is "equal to" this one.final int
hashCode()
Returns a hash code value for this object.boolean
matches
(StatsCounter p_298568_) range()
Returns the value of therange
record component.stat()
Returns the value of thestat
record component.final String
toString()
Returns a string representation of this record class.type()
Returns the value of thetype
record component.value()
Returns the value of thevalue
record component.
-
Field Details
-
type
The field for thetype
record component. -
value
The field for thevalue
record component. -
range
The field for therange
record component. -
stat
The field for thestat
record component. -
CODEC
-
-
Constructor Details
-
StatMatcher
-
StatMatcher
Creates an instance of aStatMatcher
record class.- Parameters:
type
- the value for thetype
record componentvalue
- the value for thevalue
record componentrange
- the value for therange
record componentstat
- the value for thestat
record component
-
-
Method Details
-
createTypedCodec
private static <T> com.mojang.serialization.Codec<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 thetype
record component.- Returns:
- the value of the
type
record component
-
value
Returns the value of thevalue
record component.- Returns:
- the value of the
value
record component
-
range
Returns the value of therange
record component.- Returns:
- the value of the
range
record component
-
stat
Returns the value of thestat
record component.- Returns:
- the value of the
stat
record component
-