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 cr
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
-
Nested Class Summary
Modifier and TypeClassDescriptionprivate static final record
private static interface
static class
private static final record
private static final record
Nested classes/interfaces inherited from interface net.minecraft.predicate.entity.TypeSpecificPredicate
TypeSpecificPredicate.Deserializers, TypeSpecificPredicate.Type
-
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.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, 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 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.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.type()
-
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 official b
Lcr;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
- Mappings:
Namespace Name Mixin selector official c
Lcr;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>
Lcr;<init>(Lcl$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
- Specified by:
test
in interfaceTypeSpecificPredicate
- Mappings:
Namespace Name Mixin selector official a
Lbr;a(Lbiq;Lakq;Lehn;)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 interfaceTypeSpecificPredicate
- Mappings:
Namespace Name Mixin selector official a
Lbr;a()Lbr$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
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
-