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/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
-
Nested Class Summary
Modifier and TypeClassDescriptionprivate static final record
private static interface
static class
private static final record
private static final record
-
Field Summary
Modifier and TypeFieldDescriptionprivate final Map
<Identifier, PlayerPredicate.AdvancementPredicate> The field for theadvancements
record component.static final com.mojang.serialization.MapCodec
<PlayerPredicate> private final NumberRange.IntRange
The field for theexperienceLevel
record component.private final GameModeList
The field for thegameMode
record component.static final int
private final Optional
<EntityPredicate> The field for thelookingAt
record component.private final Object2BooleanMap
<Identifier> The field for therecipes
record component.private final List
<PlayerPredicate.StatMatcher<?>> The field for thestats
record component. -
Constructor Summary
ConstructorDescriptionPlayerPredicate
(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 theadvancements
record component.final boolean
Indicates whether some other object is "equal to" this one.Returns the value of theexperienceLevel
record component.gameMode()
Returns the value of thegameMode
record component.com.mojang.serialization.MapCodec
<PlayerPredicate> getCodec()
final int
hashCode()
Returns a hash code value for this object.Returns the value of thelookingAt
record component.recipes()
Returns the value of therecipes
record component.stats()
Returns the value of thestats
record component.boolean
test
(Entity entity, ServerWorld world, @Nullable Vec3d pos) final String
toString()
Returns a string representation of this record class.
-
Field Details
-
experienceLevel
The field for theexperienceLevel
record component. -
gameMode
The field for thegameMode
record component. -
stats
The field for thestats
record component. -
recipes
The field for therecipes
record component. -
advancements
The field for theadvancements
record component. -
lookingAt
The field for thelookingAt
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
- 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
- Specified by:
test
in interfaceEntitySubPredicate
- 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
- Specified by:
getCodec
in interfaceEntitySubPredicate
- 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
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 theexperienceLevel
record component.- Returns:
- the value of the
experienceLevel
record component
-
gameMode
Returns the value of thegameMode
record component.- Returns:
- the value of the
gameMode
record component
-
stats
Returns the value of thestats
record component.- Returns:
- the value of the
stats
record component
-
recipes
Returns the value of therecipes
record component.- Returns:
- the value of the
recipes
record component
-
advancements
Returns the value of theadvancements
record component.- Returns:
- the value of the
advancements
record component
-
lookingAt
Returns the value of thelookingAt
record component.- Returns:
- the value of the
lookingAt
record component
-