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:
TypeSpecificPredicate

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

    • experienceLevel

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

      private final Optional<GameMode> 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
      official b Lcq;b:I
      intermediary field_33928 Lnet/minecraft/class_4553;field_33928:I
      named LOOKING_AT_DISTANCE Lnet/minecraft/predicate/entity/PlayerPredicate;LOOKING_AT_DISTANCE:I
    • CODEC

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

    • PlayerPredicate

      public PlayerPredicate(NumberRange.IntRange experienceLevel, Optional<GameMode> optional, List<PlayerPredicate.StatMatcher<?>> list, Object2BooleanMap<Identifier> recipes, Map<Identifier,PlayerPredicate.AdvancementPredicate> advancements, Optional<EntityPredicate> optional2)
      Mappings:
      Namespace Name Mixin selector
      official <init> Lcq;<init>(Lck$d;Ljava/util/Optional;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;Ljava/util/Optional;Ljava/util/List;Lit/unimi/dsi/fastutil/objects/Object2BooleanMap;Ljava/util/Map;Ljava/util/Optional;)V
      named <init> Lnet/minecraft/predicate/entity/PlayerPredicate;<init>(Lnet/minecraft/predicate/NumberRange$IntRange;Ljava/util/Optional;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 TypeSpecificPredicate
      Mappings:
      Namespace Name Mixin selector
      official a Lbq;a(Lblv;Land;Lelt;)Z
      intermediary method_22497 Lnet/minecraft/class_7376;method_22497(Lnet/minecraft/class_1297;Lnet/minecraft/class_3218;Lnet/minecraft/class_243;)Z
      named test Lnet/minecraft/predicate/entity/TypeSpecificPredicate;test(Lnet/minecraft/entity/Entity;Lnet/minecraft/server/world/ServerWorld;Lnet/minecraft/util/math/Vec3d;)Z
    • type

      Specified by:
      type in interface TypeSpecificPredicate
      Mappings:
      Namespace Name Mixin selector
      official a Lbq;a()Lbq$a;
      intermediary comp_1776 Lnet/minecraft/class_7376;comp_1776()Lnet/minecraft/class_7376$class_8745;
      named type Lnet/minecraft/predicate/entity/TypeSpecificPredicate;type()Lnet/minecraft/predicate/entity/TypeSpecificPredicate$Type;
    • 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 Optional<GameMode> 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