Record Class PlayerPredicate

java.lang.Object
java.lang.Record
net.minecraft.predicate.entity.PlayerPredicate
Record Components:
experienceLevel -
gameMode -
stats -
recipes -
advancements -
lookingAt -
All Implemented Interfaces:
EntitySubPredicate

public record PlayerPredicate(NumberRange.IntRange experienceLevel, GameModeList gameMode, List<PlayerPredicate.StatMatcher<?>> stats, Object2BooleanMap<Identifier> recipes, Map<Identifier,PlayerPredicate.AdvancementPredicate> advancements, Optional<EntityPredicate> lookingAt) extends Record implements EntitySubPredicate
Mappings:
Namespace Name
named net/minecraft/predicate/entity/PlayerPredicate
intermediary net/minecraft/class_4553
official dp
named experienceLevel
intermediary comp_1817
official d
named gameMode
intermediary comp_1818
official e
named stats
intermediary comp_1819
official f
named recipes
intermediary comp_1820
official g
named advancements
intermediary comp_1821
official h
named lookingAt
intermediary comp_1822
official i
  • Field Details

    • experienceLevel

      private final NumberRange.IntRange experienceLevel
      The field for the experienceLevel record component.
    • gameMode

      private final GameModeList gameMode
      The field for the gameMode record component.
    • stats

      private final List<PlayerPredicate.StatMatcher<?>> stats
      The field for the stats record component.
    • recipes

      private final Object2BooleanMap<Identifier> recipes
      The field for the recipes record component.
    • advancements

      The field for the advancements record component.
    • lookingAt

      private final Optional<EntityPredicate> lookingAt
      The field for the lookingAt record component.
    • LOOKING_AT_DISTANCE

      public static final int LOOKING_AT_DISTANCE
      See Also:
      Mappings:
      Namespace Name Mixin selector
      named LOOKING_AT_DISTANCE Lnet/minecraft/predicate/entity/PlayerPredicate;LOOKING_AT_DISTANCE:I
      intermediary field_33928 Lnet/minecraft/class_4553;field_33928:I
      official b Ldp;b:I
    • CODEC

      public static final com.mojang.serialization.MapCodec<PlayerPredicate> CODEC
      Mappings:
      Namespace Name Mixin selector
      named CODEC Lnet/minecraft/predicate/entity/PlayerPredicate;CODEC:Lcom/mojang/serialization/MapCodec;
      intermediary field_45770 Lnet/minecraft/class_4553;field_45770:Lcom/mojang/serialization/MapCodec;
      official c Ldp;c:Lcom/mojang/serialization/MapCodec;
  • Constructor Details

    • PlayerPredicate

      public PlayerPredicate(NumberRange.IntRange experienceLevel, GameModeList gameModeList, List<PlayerPredicate.StatMatcher<?>> list, Object2BooleanMap<Identifier> recipes, Map<Identifier,PlayerPredicate.AdvancementPredicate> advancements, Optional<EntityPredicate> optional)
      Mappings:
      Namespace Name Mixin selector
      named <init> Lnet/minecraft/predicate/entity/PlayerPredicate;<init>(Lnet/minecraft/predicate/NumberRange$IntRange;Lnet/minecraft/world/GameModeList;Ljava/util/List;Lit/unimi/dsi/fastutil/objects/Object2BooleanMap;Ljava/util/Map;Ljava/util/Optional;)V
      intermediary <init> Lnet/minecraft/class_4553;<init>(Lnet/minecraft/class_2096$class_2100;Lnet/minecraft/class_9789;Ljava/util/List;Lit/unimi/dsi/fastutil/objects/Object2BooleanMap;Ljava/util/Map;Ljava/util/Optional;)V
      official <init> Ldp;<init>(Ldh$d;Lce;Ljava/util/List;Lit/unimi/dsi/fastutil/objects/Object2BooleanMap;Ljava/util/Map;Ljava/util/Optional;)V
  • Method Details

    • test

      public boolean test(Entity entity, ServerWorld world, @Nullable @Nullable Vec3d pos)
      Specified by:
      test in interface EntitySubPredicate
      Mappings:
      Namespace Name Mixin selector
      named test Lnet/minecraft/predicate/entity/EntitySubPredicate;test(Lnet/minecraft/entity/Entity;Lnet/minecraft/server/world/ServerWorld;Lnet/minecraft/util/math/Vec3d;)Z
      intermediary method_22497 Lnet/minecraft/class_7376;method_22497(Lnet/minecraft/class_1297;Lnet/minecraft/class_3218;Lnet/minecraft/class_243;)Z
      official a Lbw;a(Lbsr;Laqu;Lexc;)Z
    • getCodec

      public com.mojang.serialization.MapCodec<PlayerPredicate> getCodec()
      Specified by:
      getCodec in interface EntitySubPredicate
      Mappings:
      Namespace Name Mixin selector
      named getCodec Lnet/minecraft/predicate/entity/EntitySubPredicate;getCodec()Lcom/mojang/serialization/MapCodec;
      intermediary method_58152 Lnet/minecraft/class_7376;method_58152()Lcom/mojang/serialization/MapCodec;
      official a Lbw;a()Lcom/mojang/serialization/MapCodec;
    • 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.
    • experienceLevel

      public NumberRange.IntRange experienceLevel()
      Returns the value of the experienceLevel record component.
      Returns:
      the value of the experienceLevel record component
    • gameMode

      public GameModeList gameMode()
      Returns the value of the gameMode record component.
      Returns:
      the value of the gameMode record component
    • stats

      public List<PlayerPredicate.StatMatcher<?>> stats()
      Returns the value of the stats record component.
      Returns:
      the value of the stats record component
    • recipes

      public Object2BooleanMap<Identifier> recipes()
      Returns the value of the recipes record component.
      Returns:
      the value of the recipes record component
    • advancements

      Returns the value of the advancements record component.
      Returns:
      the value of the advancements record component
    • lookingAt

      public Optional<EntityPredicate> lookingAt()
      Returns the value of the lookingAt record component.
      Returns:
      the value of the lookingAt record component