Package net.minecraft.predicate.entity
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 cqintermediary net/minecraft/class_4553named net/minecraft/predicate/entity/PlayerPredicateofficial dintermediary comp_1817named experienceLevelofficial eintermediary comp_1818named gameModeofficial fintermediary comp_1819named statsofficial gintermediary comp_1820named recipesofficial hintermediary comp_1821named advancementsofficial iintermediary comp_1822named lookingAt
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionprivate static final recordprivate static interfacestatic classprivate static final recordprivate static final recordNested classes/interfaces inherited from interface net.minecraft.predicate.entity.TypeSpecificPredicate
TypeSpecificPredicate.Deserializers, TypeSpecificPredicate.Type -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final Map<Identifier,PlayerPredicate.AdvancementPredicate> The field for theadvancementsrecord component.static final com.mojang.serialization.MapCodec<PlayerPredicate>private final NumberRange.IntRangeThe field for theexperienceLevelrecord component.The field for thegameModerecord component.static final intprivate final Optional<EntityPredicate>The field for thelookingAtrecord component.private final Object2BooleanMap<Identifier>The field for therecipesrecord component.private final List<PlayerPredicate.StatMatcher<?>>The field for thestatsrecord component. -
Constructor Summary
ConstructorsConstructorDescriptionPlayerPredicate(NumberRange.IntRange experienceLevel, Optional<GameMode> optional, List<PlayerPredicate.StatMatcher<?>> list, Object2BooleanMap<Identifier> recipes, Map<Identifier, PlayerPredicate.AdvancementPredicate> advancements, Optional<EntityPredicate> optional2) -
Method Summary
Modifier and TypeMethodDescriptionReturns the value of theadvancementsrecord component.final booleanIndicates whether some other object is "equal to" this one.Returns the value of theexperienceLevelrecord component.gameMode()Returns the value of thegameModerecord component.final inthashCode()Returns a hash code value for this object.Returns the value of thelookingAtrecord component.recipes()Returns the value of therecipesrecord component.stats()Returns the value of thestatsrecord component.booleantest(Entity entity, ServerWorld world, @Nullable Vec3d pos) final StringtoString()Returns a string representation of this record class.type()
-
Field Details
-
experienceLevel
The field for theexperienceLevelrecord component. -
gameMode
The field for thegameModerecord component. -
stats
The field for thestatsrecord component. -
recipes
The field for therecipesrecord component. -
advancements
The field for theadvancementsrecord component. -
lookingAt
The field for thelookingAtrecord component. -
LOOKING_AT_DISTANCE
public static final int LOOKING_AT_DISTANCE- See Also:
- Mappings:
Namespace Name Mixin selector official bLcq;b:Iintermediary field_33928Lnet/minecraft/class_4553;field_33928:Inamed LOOKING_AT_DISTANCELnet/minecraft/predicate/entity/PlayerPredicate;LOOKING_AT_DISTANCE:I
-
CODEC
- Mappings:
Namespace Name Mixin selector official cLcq;c:Lcom/mojang/serialization/MapCodec;intermediary field_45770Lnet/minecraft/class_4553;field_45770:Lcom/mojang/serialization/MapCodec;named CODECLnet/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;)Vintermediary <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;)Vnamed <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
- Specified by:
testin interfaceTypeSpecificPredicate- Mappings:
Namespace Name Mixin selector official aLbq;a(Lblv;Land;Lelt;)Zintermediary method_22497Lnet/minecraft/class_7376;method_22497(Lnet/minecraft/class_1297;Lnet/minecraft/class_3218;Lnet/minecraft/class_243;)Znamed testLnet/minecraft/predicate/entity/TypeSpecificPredicate;test(Lnet/minecraft/entity/Entity;Lnet/minecraft/server/world/ServerWorld;Lnet/minecraft/util/math/Vec3d;)Z
-
type
- Specified by:
typein interfaceTypeSpecificPredicate- Mappings:
Namespace Name Mixin selector official aLbq;a()Lbq$a;intermediary comp_1776Lnet/minecraft/class_7376;comp_1776()Lnet/minecraft/class_7376$class_8745;named typeLnet/minecraft/predicate/entity/TypeSpecificPredicate;type()Lnet/minecraft/predicate/entity/TypeSpecificPredicate$Type;
-
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). -
experienceLevel
Returns the value of theexperienceLevelrecord component.- Returns:
- the value of the
experienceLevelrecord component
-
gameMode
Returns the value of thegameModerecord component.- Returns:
- the value of the
gameModerecord component
-
stats
Returns the value of thestatsrecord component.- Returns:
- the value of the
statsrecord component
-
recipes
Returns the value of therecipesrecord component.- Returns:
- the value of the
recipesrecord component
-
advancements
Returns the value of theadvancementsrecord component.- Returns:
- the value of the
advancementsrecord component
-
lookingAt
Returns the value of thelookingAtrecord component.- Returns:
- the value of the
lookingAtrecord component
-