Package net.minecraft.predicate.entity
Record Class EntityPredicate
java.lang.Object
java.lang.Record
net.minecraft.predicate.entity.EntityPredicate
- Record Components:
type
-distance
-movement
-location
-effects
-nbt
-flags
-equipment
-typeSpecific
-periodicTick
-vehicle
-passenger
-targetedEntity
-team
-slots
-
public record EntityPredicate(Optional<EntityTypePredicate> type, Optional<DistancePredicate> distance, Optional<MovementPredicate> movement, EntityPredicate.PositionalPredicates location, Optional<EntityEffectPredicate> effects, Optional<NbtPredicate> nbt, Optional<EntityFlagsPredicate> flags, Optional<EntityEquipmentPredicate> equipment, Optional<EntitySubPredicate> typeSpecific, Optional<Integer> periodicTick, Optional<EntityPredicate> vehicle, Optional<EntityPredicate> passenger, Optional<EntityPredicate> targetedEntity, Optional<String> team, Optional<SlotsPredicate> slots)
extends Record
- Mappings:
Namespace Name named net/minecraft/predicate/entity/EntityPredicate
intermediary net/minecraft/class_2048
official bw
named type
intermediary comp_1761
official c
named distance
intermediary comp_1762
official d
named movement
intermediary comp_2668
official e
named location
intermediary comp_1763
official f
named effects
intermediary comp_1765
official g
named nbt
intermediary comp_1766
official h
named flags
intermediary comp_1767
official i
named equipment
intermediary comp_1768
official j
named typeSpecific
intermediary comp_1769
official k
named periodicTick
intermediary comp_2669
official l
named vehicle
intermediary comp_1770
official m
named passenger
intermediary comp_1771
official n
named targetedEntity
intermediary comp_1772
official o
named team
intermediary comp_1773
official p
named slots
intermediary comp_2446
official q
-
Nested Class Summary
Modifier and TypeClassDescriptionstatic class
static final record
-
Field Summary
Modifier and TypeFieldDescriptionstatic final com.mojang.serialization.Codec
<EntityPredicate> private final Optional
<DistancePredicate> The field for thedistance
record component.private final Optional
<EntityEffectPredicate> The field for theeffects
record component.private final Optional
<EntityEquipmentPredicate> The field for theequipment
record component.private final Optional
<EntityFlagsPredicate> The field for theflags
record component.private final EntityPredicate.PositionalPredicates
The field for thelocation
record component.static final com.mojang.serialization.Codec
<LootContextPredicate> private final Optional
<MovementPredicate> The field for themovement
record component.private final Optional
<NbtPredicate> The field for thenbt
record component.private final Optional
<EntityPredicate> The field for thepassenger
record component.The field for theperiodicTick
record component.private final Optional
<SlotsPredicate> The field for theslots
record component.private final Optional
<EntityPredicate> The field for thetargetedEntity
record component.The field for theteam
record component.private final Optional
<EntityTypePredicate> The field for thetype
record component.private final Optional
<EntitySubPredicate> The field for thetypeSpecific
record component.private final Optional
<EntityPredicate> The field for thevehicle
record component. -
Constructor Summary
ConstructorDescriptionEntityPredicate
(Optional<EntityTypePredicate> optional, Optional<DistancePredicate> optional2, Optional<MovementPredicate> optional3, EntityPredicate.PositionalPredicates positionalPredicates, Optional<EntityEffectPredicate> optional4, Optional<NbtPredicate> optional5, Optional<EntityFlagsPredicate> optional6, Optional<EntityEquipmentPredicate> optional7, Optional<EntitySubPredicate> optional8, Optional<Integer> optional9, Optional<EntityPredicate> optional10, Optional<EntityPredicate> optional11, Optional<EntityPredicate> optional12, Optional<String> optional13, Optional<SlotsPredicate> optional14) -
Method Summary
Modifier and TypeMethodDescriptionstatic LootContextPredicate
asLootContextPredicate
(EntityPredicate predicate) static Optional
<LootContextPredicate> contextPredicateFromEntityPredicate
(Optional<EntityPredicate> entityPredicate) static LootContextPredicate
static List
<LootContextPredicate> static LootContext
createAdvancementEntityLootContext
(ServerPlayerEntity player, Entity target) distance()
Returns the value of thedistance
record component.effects()
Returns the value of theeffects
record component.final boolean
Indicates whether some other object is "equal to" this one.Returns the value of theequipment
record component.flags()
Returns the value of theflags
record component.final int
hashCode()
Returns a hash code value for this object.location()
Returns the value of thelocation
record component.movement()
Returns the value of themovement
record component.nbt()
Returns the value of thenbt
record component.Returns the value of thepassenger
record component.Returns the value of theperiodicTick
record component.slots()
Returns the value of theslots
record component.Returns the value of thetargetedEntity
record component.team()
Returns the value of theteam
record component.boolean
test
(ServerPlayerEntity player, @Nullable Entity entity) boolean
final String
toString()
Returns a string representation of this record class.type()
Returns the value of thetype
record component.Returns the value of thetypeSpecific
record component.vehicle()
Returns the value of thevehicle
record component.
-
Field Details
-
type
The field for thetype
record component. -
distance
The field for thedistance
record component. -
movement
The field for themovement
record component. -
location
The field for thelocation
record component. -
effects
The field for theeffects
record component. -
nbt
The field for thenbt
record component. -
flags
The field for theflags
record component. -
equipment
The field for theequipment
record component. -
typeSpecific
The field for thetypeSpecific
record component. -
periodicTick
The field for theperiodicTick
record component. -
vehicle
The field for thevehicle
record component. -
passenger
The field for thepassenger
record component. -
targetedEntity
The field for thetargetedEntity
record component. -
team
The field for theteam
record component. -
slots
The field for theslots
record component. -
CODEC
- Mappings:
Namespace Name Mixin selector named CODEC
Lnet/minecraft/predicate/entity/EntityPredicate;CODEC:Lcom/mojang/serialization/Codec;
intermediary field_45746
Lnet/minecraft/class_2048;field_45746:Lcom/mojang/serialization/Codec;
official a
Lbw;a:Lcom/mojang/serialization/Codec;
-
LOOT_CONTEXT_PREDICATE_CODEC
public static final com.mojang.serialization.Codec<LootContextPredicate> LOOT_CONTEXT_PREDICATE_CODEC- Mappings:
Namespace Name Mixin selector named LOOT_CONTEXT_PREDICATE_CODEC
Lnet/minecraft/predicate/entity/EntityPredicate;LOOT_CONTEXT_PREDICATE_CODEC:Lcom/mojang/serialization/Codec;
intermediary field_47250
Lnet/minecraft/class_2048;field_47250:Lcom/mojang/serialization/Codec;
official b
Lbw;b:Lcom/mojang/serialization/Codec;
-
-
Constructor Details
-
EntityPredicate
public EntityPredicate(Optional<EntityTypePredicate> optional, Optional<DistancePredicate> optional2, Optional<MovementPredicate> optional3, EntityPredicate.PositionalPredicates positionalPredicates, Optional<EntityEffectPredicate> optional4, Optional<NbtPredicate> optional5, Optional<EntityFlagsPredicate> optional6, Optional<EntityEquipmentPredicate> optional7, Optional<EntitySubPredicate> optional8, Optional<Integer> optional9, Optional<EntityPredicate> optional10, Optional<EntityPredicate> optional11, Optional<EntityPredicate> optional12, Optional<String> optional13, Optional<SlotsPredicate> optional14)
-
-
Method Details
-
contextPredicateFromEntityPredicate
public static LootContextPredicate contextPredicateFromEntityPredicate(EntityPredicate.Builder builder) - Mappings:
Namespace Name Mixin selector named contextPredicateFromEntityPredicate
Lnet/minecraft/predicate/entity/EntityPredicate;contextPredicateFromEntityPredicate(Lnet/minecraft/predicate/entity/EntityPredicate$Builder;)Lnet/minecraft/predicate/entity/LootContextPredicate;
intermediary method_53134
Lnet/minecraft/class_2048;method_53134(Lnet/minecraft/class_2048$class_2049;)Lnet/minecraft/class_5258;
official a
Lbw;a(Lbw$a;)Lbh;
-
contextPredicateFromEntityPredicate
public static Optional<LootContextPredicate> contextPredicateFromEntityPredicate(Optional<EntityPredicate> entityPredicate) - Mappings:
Namespace Name Mixin selector named contextPredicateFromEntityPredicate
Lnet/minecraft/predicate/entity/EntityPredicate;contextPredicateFromEntityPredicate(Ljava/util/Optional;)Ljava/util/Optional;
intermediary method_53137
Lnet/minecraft/class_2048;method_53137(Ljava/util/Optional;)Ljava/util/Optional;
official a
Lbw;a(Ljava/util/Optional;)Ljava/util/Optional;
-
contextPredicateFromEntityPredicates
public static List<LootContextPredicate> contextPredicateFromEntityPredicates(EntityPredicate.Builder[] builders) - Mappings:
Namespace Name Mixin selector named contextPredicateFromEntityPredicates
Lnet/minecraft/predicate/entity/EntityPredicate;contextPredicateFromEntityPredicates([Lnet/minecraft/predicate/entity/EntityPredicate$Builder;)Ljava/util/List;
intermediary method_53139
Lnet/minecraft/class_2048;method_53139([Lnet/minecraft/class_2048$class_2049;)Ljava/util/List;
official a
Lbw;a([Lbw$a;)Ljava/util/List;
-
asLootContextPredicate
- Mappings:
Namespace Name Mixin selector named asLootContextPredicate
Lnet/minecraft/predicate/entity/EntityPredicate;asLootContextPredicate(Lnet/minecraft/predicate/entity/EntityPredicate;)Lnet/minecraft/predicate/entity/LootContextPredicate;
intermediary method_51704
Lnet/minecraft/class_2048;method_51704(Lnet/minecraft/class_2048;)Lnet/minecraft/class_5258;
official a
Lbw;a(Lbw;)Lbh;
-
test
- Mappings:
Namespace Name Mixin selector named test
Lnet/minecraft/predicate/entity/EntityPredicate;test(Lnet/minecraft/server/network/ServerPlayerEntity;Lnet/minecraft/entity/Entity;)Z
intermediary method_8914
Lnet/minecraft/class_2048;method_8914(Lnet/minecraft/class_3222;Lnet/minecraft/class_1297;)Z
official a
Lbw;a(Lasi;Lbvj;)Z
-
test
public boolean test(ServerWorld world, @Nullable @Nullable Vec3d pos, @Nullable @Nullable Entity entity) - Mappings:
Namespace Name Mixin selector named test
Lnet/minecraft/predicate/entity/EntityPredicate;test(Lnet/minecraft/server/world/ServerWorld;Lnet/minecraft/util/math/Vec3d;Lnet/minecraft/entity/Entity;)Z
intermediary method_8909
Lnet/minecraft/class_2048;method_8909(Lnet/minecraft/class_3218;Lnet/minecraft/class_243;Lnet/minecraft/class_1297;)Z
official a
Lbw;a(Lash;Lfbx;Lbvj;)Z
-
createAdvancementEntityLootContext
public static LootContext createAdvancementEntityLootContext(ServerPlayerEntity player, Entity target) - Mappings:
Namespace Name Mixin selector named createAdvancementEntityLootContext
Lnet/minecraft/predicate/entity/EntityPredicate;createAdvancementEntityLootContext(Lnet/minecraft/server/network/ServerPlayerEntity;Lnet/minecraft/entity/Entity;)Lnet/minecraft/loot/context/LootContext;
intermediary method_27802
Lnet/minecraft/class_2048;method_27802(Lnet/minecraft/class_3222;Lnet/minecraft/class_1297;)Lnet/minecraft/class_47;
official b
Lbw;b(Lasi;Lbvj;)Lewo;
-
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)
. -
type
Returns the value of thetype
record component.- Returns:
- the value of the
type
record component
-
distance
Returns the value of thedistance
record component.- Returns:
- the value of the
distance
record component
-
movement
Returns the value of themovement
record component.- Returns:
- the value of the
movement
record component
-
location
Returns the value of thelocation
record component.- Returns:
- the value of the
location
record component
-
effects
Returns the value of theeffects
record component.- Returns:
- the value of the
effects
record component
-
nbt
Returns the value of thenbt
record component.- Returns:
- the value of the
nbt
record component
-
flags
Returns the value of theflags
record component.- Returns:
- the value of the
flags
record component
-
equipment
Returns the value of theequipment
record component.- Returns:
- the value of the
equipment
record component
-
typeSpecific
Returns the value of thetypeSpecific
record component.- Returns:
- the value of the
typeSpecific
record component
-
periodicTick
Returns the value of theperiodicTick
record component.- Returns:
- the value of the
periodicTick
record component
-
vehicle
Returns the value of thevehicle
record component.- Returns:
- the value of the
vehicle
record component
-
passenger
Returns the value of thepassenger
record component.- Returns:
- the value of the
passenger
record component
-
targetedEntity
Returns the value of thetargetedEntity
record component.- Returns:
- the value of the
targetedEntity
record component
-
team
Returns the value of theteam
record component.- Returns:
- the value of the
team
record component
-
slots
Returns the value of theslots
record component.- Returns:
- the value of the
slots
record component
-