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-
- input-
- All Implemented Interfaces:
- EntitySubPredicate
public record PlayerPredicate(NumberRange.IntRange experienceLevel, GameModeList gameMode, List<PlayerPredicate.StatMatcher<?>> stats, Object2BooleanMap<RegistryKey<Recipe<?>>> recipes, Map<Identifier,PlayerPredicate.AdvancementPredicate> advancements, Optional<EntityPredicate> lookingAt, Optional<InputPredicate> input)
extends Record
implements EntitySubPredicate 
- Mappings:
- Namespace - Name - named - net/minecraft/predicate/entity/PlayerPredicate- intermediary - net/minecraft/class_4553- official - ds- 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- named - input- intermediary - comp_3182- official - j
- 
Nested Class SummaryNested ClassesModifier and TypeClassDescriptionprivate static final recordprivate static interfacestatic classprivate static final recordprivate static final record
- 
Field SummaryFieldsModifier 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.private final Optional<InputPredicate> The field for theinputrecord component.static final intprivate final Optional<EntityPredicate> The field for thelookingAtrecord component.private final Object2BooleanMap<RegistryKey<Recipe<?>>> The field for therecipesrecord component.private final List<PlayerPredicate.StatMatcher<?>> The field for thestatsrecord component.
- 
Constructor SummaryConstructorsConstructorDescriptionPlayerPredicate(NumberRange.IntRange experienceLevel, GameModeList gameModeList, List<PlayerPredicate.StatMatcher<?>> list, Object2BooleanMap<RegistryKey<Recipe<?>>> recipes, Map<Identifier, PlayerPredicate.AdvancementPredicate> advancements, Optional<EntityPredicate> optional, Optional<InputPredicate> optional2) 
- 
Method SummaryModifier 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.input()Returns the value of theinputrecord component.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- 
experienceLevelThe field for theexperienceLevelrecord component.
- 
gameModeThe field for thegameModerecord component.
- 
statsThe field for thestatsrecord component.
- 
recipesThe field for therecipesrecord component.
- 
advancementsThe field for theadvancementsrecord component.
- 
lookingAtThe field for thelookingAtrecord component.
- 
inputThe field for theinputrecord component.
- 
LOOKING_AT_DISTANCEpublic 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- Lds;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- Lds;c:Lcom/mojang/serialization/MapCodec;
 
 
- 
- 
Constructor Details- 
PlayerPredicatepublic PlayerPredicate(NumberRange.IntRange experienceLevel, GameModeList gameModeList, List<PlayerPredicate.StatMatcher<?>> list, Object2BooleanMap<RegistryKey<Recipe<?>>> recipes, Map<Identifier, PlayerPredicate.AdvancementPredicate> advancements, Optional<EntityPredicate> optional, Optional<InputPredicate> optional2) - 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;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;Ljava/util/Optional;)V- official - <init>- Lds;<init>(Ldk$d;Lcg;Ljava/util/List;Lit/unimi/dsi/fastutil/objects/Object2BooleanMap;Ljava/util/Map;Ljava/util/Optional;Ljava/util/Optional;)V
 
 
- 
- 
Method Details- 
test- Specified by:
- testin interface- EntitySubPredicate
- 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- Lby;a(Lbum;Lard;Lfbb;)Z
 
- 
getCodec- Specified by:
- getCodecin interface- EntitySubPredicate
- 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- Lby;a()Lcom/mojang/serialization/MapCodec;
 
- 
toStringReturns 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.
- 
hashCodepublic 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.
- 
equalsIndicates 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).
- 
experienceLevelReturns the value of theexperienceLevelrecord component.- Returns:
- the value of the experienceLevelrecord component
 
- 
gameModeReturns the value of thegameModerecord component.- Returns:
- the value of the gameModerecord component
 
- 
statsReturns the value of thestatsrecord component.- Returns:
- the value of the statsrecord component
 
- 
recipesReturns the value of therecipesrecord component.- Returns:
- the value of the recipesrecord component
 
- 
advancementsReturns the value of theadvancementsrecord component.- Returns:
- the value of the advancementsrecord component
 
- 
lookingAtReturns the value of thelookingAtrecord component.- Returns:
- the value of the lookingAtrecord component
 
- 
inputReturns the value of theinputrecord component.- Returns:
- the value of the inputrecord component
 
 
-