Record Class PlayerPredicate.StatMatcher<T>

java.lang.Object
java.lang.Record
net.minecraft.predicate.entity.PlayerPredicate.StatMatcher<T>
Record Components:
type -
value -
range -
stat -
Enclosing class:
PlayerPredicate

private static record PlayerPredicate.StatMatcher<T>(StatType<T> type, RegistryEntry<T> value, NumberRange.IntRange range, Supplier<Stat<T>> stat) extends Record
Mappings:
Namespace Name
official cr$e
intermediary net/minecraft/class_4553$class_8749
named net/minecraft/predicate/entity/PlayerPredicate$StatMatcher
official b
intermediary comp_1825
named type
official c
intermediary comp_1826
named value
official d
intermediary comp_1827
named range
official e
intermediary comp_1828
named stat
  • Field Details

    • type

      private final StatType<T> type
      The field for the type record component.
    • value

      private final RegistryEntry<T> value
      The field for the value record component.
    • range

      private final NumberRange.IntRange range
      The field for the range record component.
    • stat

      private final Supplier<Stat<T>> stat
      The field for the stat record component.
    • CODEC

      public static final com.mojang.serialization.Codec<PlayerPredicate.StatMatcher<?>> CODEC
      Mappings:
      Namespace Name Mixin selector
      official a Lcr$e;a:Lcom/mojang/serialization/Codec;
      intermediary field_45774 Lnet/minecraft/class_4553$class_8749;field_45774:Lcom/mojang/serialization/Codec;
      named CODEC Lnet/minecraft/predicate/entity/PlayerPredicate$StatMatcher;CODEC:Lcom/mojang/serialization/Codec;
  • Constructor Details

    • StatMatcher

      public StatMatcher(StatType<T> type, RegistryEntry<T> value, NumberRange.IntRange range)
      Mappings:
      Namespace Name Mixin selector
      official <init> Lcr$e;<init>(Lapm;Lhe;Lcl$d;)V
      intermediary <init> Lnet/minecraft/class_4553$class_8749;<init>(Lnet/minecraft/class_3448;Lnet/minecraft/class_6880;Lnet/minecraft/class_2096$class_2100;)V
      named <init> Lnet/minecraft/predicate/entity/PlayerPredicate$StatMatcher;<init>(Lnet/minecraft/stat/StatType;Lnet/minecraft/registry/entry/RegistryEntry;Lnet/minecraft/predicate/NumberRange$IntRange;)V
    • StatMatcher

      private StatMatcher(StatType<T> statType, RegistryEntry<T> registryEntry, NumberRange.IntRange intRange, Supplier<Stat<T>> supplier)
  • Method Details

    • createCodec

      private static <T> com.mojang.serialization.Codec<PlayerPredicate.StatMatcher<T>> createCodec(StatType<T> type)
      Mappings:
      Namespace Name Mixin selector
      official a Lcr$e;a(Lapm;)Lcom/mojang/serialization/Codec;
      intermediary method_53224 Lnet/minecraft/class_4553$class_8749;method_53224(Lnet/minecraft/class_3448;)Lcom/mojang/serialization/Codec;
      named createCodec Lnet/minecraft/predicate/entity/PlayerPredicate$StatMatcher;createCodec(Lnet/minecraft/stat/StatType;)Lcom/mojang/serialization/Codec;
    • test

      public boolean test(StatHandler statHandler)
      Mappings:
      Namespace Name Mixin selector
      official a Lcr$e;a(Lapo;)Z
      intermediary method_53228 Lnet/minecraft/class_4553$class_8749;method_53228(Lnet/minecraft/class_3469;)Z
      named test Lnet/minecraft/predicate/entity/PlayerPredicate$StatMatcher;test(Lnet/minecraft/stat/StatHandler;)Z
    • toString

      public final String 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.
      Specified by:
      toString in class Record
      Returns:
      a string representation of this object
    • 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.
      Specified by:
      hashCode in class Record
      Returns:
      a hash code value for this object
    • equals

      public final boolean equals(Object object)
      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 with Objects::equals(Object,Object).
      Specified by:
      equals in class Record
      Parameters:
      object - the object with which to compare
      Returns:
      true if this object is the same as the object argument; false otherwise.
    • type

      public StatType<T> type()
      Returns the value of the type record component.
      Returns:
      the value of the type record component
    • value

      public RegistryEntry<T> value()
      Returns the value of the value record component.
      Returns:
      the value of the value record component
    • range

      public NumberRange.IntRange range()
      Returns the value of the range record component.
      Returns:
      the value of the range record component
    • stat

      public Supplier<Stat<T>> stat()
      Returns the value of the stat record component.
      Returns:
      the value of the stat record component