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:
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/PlayerPredicateintermediary net/minecraft/class_4553official dpnamed experienceLevelintermediary comp_1817official dnamed gameModeintermediary comp_1818official enamed statsintermediary comp_1819official fnamed recipesintermediary comp_1820official gnamed advancementsintermediary comp_1821official hnamed lookingAtintermediary comp_1822official i
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionprivate static final recordprivate static interfacestatic classprivate static final recordprivate static final record -
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.private final GameModeListThe 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, GameModeList gameModeList, List<PlayerPredicate.StatMatcher<?>> list, Object2BooleanMap<Identifier> recipes, Map<Identifier, PlayerPredicate.AdvancementPredicate> advancements, Optional<EntityPredicate> optional) -
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.com.mojang.serialization.MapCodec<PlayerPredicate> getCodec()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.
-
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 named LOOKING_AT_DISTANCELnet/minecraft/predicate/entity/PlayerPredicate;LOOKING_AT_DISTANCE:Iintermediary field_33928Lnet/minecraft/class_4553;field_33928:Iofficial bLdp;b:I
-
CODEC
- Mappings:
Namespace Name Mixin selector named CODECLnet/minecraft/predicate/entity/PlayerPredicate;CODEC:Lcom/mojang/serialization/MapCodec;intermediary field_45770Lnet/minecraft/class_4553;field_45770:Lcom/mojang/serialization/MapCodec;official cLdp;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;)Vintermediary <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;)Vofficial <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
- Specified by:
testin interfaceEntitySubPredicate- Mappings:
Namespace Name Mixin selector named testLnet/minecraft/predicate/entity/EntitySubPredicate;test(Lnet/minecraft/entity/Entity;Lnet/minecraft/server/world/ServerWorld;Lnet/minecraft/util/math/Vec3d;)Zintermediary method_22497Lnet/minecraft/class_7376;method_22497(Lnet/minecraft/class_1297;Lnet/minecraft/class_3218;Lnet/minecraft/class_243;)Zofficial aLbw;a(Lbsr;Laqu;Lexc;)Z
-
getCodec
- Specified by:
getCodecin interfaceEntitySubPredicate- Mappings:
Namespace Name Mixin selector named getCodecLnet/minecraft/predicate/entity/EntitySubPredicate;getCodec()Lcom/mojang/serialization/MapCodec;intermediary method_58152Lnet/minecraft/class_7376;method_58152()Lcom/mojang/serialization/MapCodec;official aLbw;a()Lcom/mojang/serialization/MapCodec;
-
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
-