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/EntityPredicateintermediary net/minecraft/class_2048official bvnamed typeintermediary comp_1761official cnamed distanceintermediary comp_1762official dnamed movementintermediary comp_2668official enamed locationintermediary comp_1763official fnamed effectsintermediary comp_1765official gnamed nbtintermediary comp_1766official hnamed flagsintermediary comp_1767official inamed equipmentintermediary comp_1768official jnamed typeSpecificintermediary comp_1769official knamed periodicTickintermediary comp_2669official lnamed vehicleintermediary comp_1770official mnamed passengerintermediary comp_1771official nnamed targetedEntityintermediary comp_1772official onamed teamintermediary comp_1773official pnamed slotsintermediary comp_2446official q
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classstatic final record -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final com.mojang.serialization.Codec<EntityPredicate> private final Optional<DistancePredicate> The field for thedistancerecord component.private final Optional<EntityEffectPredicate> The field for theeffectsrecord component.private final Optional<EntityEquipmentPredicate> The field for theequipmentrecord component.private final Optional<EntityFlagsPredicate> The field for theflagsrecord component.private final EntityPredicate.PositionalPredicatesThe field for thelocationrecord component.static final com.mojang.serialization.Codec<LootContextPredicate> private final Optional<MovementPredicate> The field for themovementrecord component.private final Optional<NbtPredicate> The field for thenbtrecord component.private final Optional<EntityPredicate> The field for thepassengerrecord component.The field for theperiodicTickrecord component.private final Optional<SlotsPredicate> The field for theslotsrecord component.private final Optional<EntityPredicate> The field for thetargetedEntityrecord component.The field for theteamrecord component.private final Optional<EntityTypePredicate> The field for thetyperecord component.private final Optional<EntitySubPredicate> The field for thetypeSpecificrecord component.private final Optional<EntityPredicate> The field for thevehiclerecord component. -
Constructor Summary
ConstructorsConstructorDescriptionEntityPredicate(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 LootContextPredicateasLootContextPredicate(EntityPredicate predicate) static Optional<LootContextPredicate> contextPredicateFromEntityPredicate(Optional<EntityPredicate> entityPredicate) static LootContextPredicatestatic List<LootContextPredicate> static LootContextcreateAdvancementEntityLootContext(ServerPlayerEntity player, Entity target) distance()Returns the value of thedistancerecord component.effects()Returns the value of theeffectsrecord component.final booleanIndicates whether some other object is "equal to" this one.Returns the value of theequipmentrecord component.flags()Returns the value of theflagsrecord component.final inthashCode()Returns a hash code value for this object.location()Returns the value of thelocationrecord component.movement()Returns the value of themovementrecord component.nbt()Returns the value of thenbtrecord component.Returns the value of thepassengerrecord component.Returns the value of theperiodicTickrecord component.slots()Returns the value of theslotsrecord component.Returns the value of thetargetedEntityrecord component.team()Returns the value of theteamrecord component.booleantest(ServerPlayerEntity player, @Nullable Entity entity) booleanfinal StringtoString()Returns a string representation of this record class.type()Returns the value of thetyperecord component.Returns the value of thetypeSpecificrecord component.vehicle()Returns the value of thevehiclerecord component.
-
Field Details
-
type
The field for thetyperecord component. -
distance
The field for thedistancerecord component. -
movement
The field for themovementrecord component. -
location
The field for thelocationrecord component. -
effects
The field for theeffectsrecord component. -
nbt
The field for thenbtrecord component. -
flags
The field for theflagsrecord component. -
equipment
The field for theequipmentrecord component. -
typeSpecific
The field for thetypeSpecificrecord component. -
periodicTick
The field for theperiodicTickrecord component. -
vehicle
The field for thevehiclerecord component. -
passenger
The field for thepassengerrecord component. -
targetedEntity
The field for thetargetedEntityrecord component. -
team
The field for theteamrecord component. -
slots
The field for theslotsrecord component. -
CODEC
- Mappings:
Namespace Name Mixin selector named CODECLnet/minecraft/predicate/entity/EntityPredicate;CODEC:Lcom/mojang/serialization/Codec;intermediary field_45746Lnet/minecraft/class_2048;field_45746:Lcom/mojang/serialization/Codec;official aLbv;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_CODECLnet/minecraft/predicate/entity/EntityPredicate;LOOT_CONTEXT_PREDICATE_CODEC:Lcom/mojang/serialization/Codec;intermediary field_47250Lnet/minecraft/class_2048;field_47250:Lcom/mojang/serialization/Codec;official bLbv;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 contextPredicateFromEntityPredicateLnet/minecraft/predicate/entity/EntityPredicate;contextPredicateFromEntityPredicate(Lnet/minecraft/predicate/entity/EntityPredicate$Builder;)Lnet/minecraft/predicate/entity/LootContextPredicate;intermediary method_53134Lnet/minecraft/class_2048;method_53134(Lnet/minecraft/class_2048$class_2049;)Lnet/minecraft/class_5258;official aLbv;a(Lbv$a;)Lbg;
-
contextPredicateFromEntityPredicate
public static Optional<LootContextPredicate> contextPredicateFromEntityPredicate(Optional<EntityPredicate> entityPredicate) - Mappings:
Namespace Name Mixin selector named contextPredicateFromEntityPredicateLnet/minecraft/predicate/entity/EntityPredicate;contextPredicateFromEntityPredicate(Ljava/util/Optional;)Ljava/util/Optional;intermediary method_53137Lnet/minecraft/class_2048;method_53137(Ljava/util/Optional;)Ljava/util/Optional;official aLbv;a(Ljava/util/Optional;)Ljava/util/Optional;
-
contextPredicateFromEntityPredicates
public static List<LootContextPredicate> contextPredicateFromEntityPredicates(EntityPredicate.Builder[] builders) - Mappings:
Namespace Name Mixin selector named contextPredicateFromEntityPredicatesLnet/minecraft/predicate/entity/EntityPredicate;contextPredicateFromEntityPredicates([Lnet/minecraft/predicate/entity/EntityPredicate$Builder;)Ljava/util/List;intermediary method_53139Lnet/minecraft/class_2048;method_53139([Lnet/minecraft/class_2048$class_2049;)Ljava/util/List;official aLbv;a([Lbv$a;)Ljava/util/List;
-
asLootContextPredicate
- Mappings:
Namespace Name Mixin selector named asLootContextPredicateLnet/minecraft/predicate/entity/EntityPredicate;asLootContextPredicate(Lnet/minecraft/predicate/entity/EntityPredicate;)Lnet/minecraft/predicate/entity/LootContextPredicate;intermediary method_51704Lnet/minecraft/class_2048;method_51704(Lnet/minecraft/class_2048;)Lnet/minecraft/class_5258;official aLbv;a(Lbv;)Lbg;
-
test
- Mappings:
Namespace Name Mixin selector named testLnet/minecraft/predicate/entity/EntityPredicate;test(Lnet/minecraft/server/network/ServerPlayerEntity;Lnet/minecraft/entity/Entity;)Zintermediary method_8914Lnet/minecraft/class_2048;method_8914(Lnet/minecraft/class_3222;Lnet/minecraft/class_1297;)Zofficial aLbv;a(Laqv;Lbsr;)Z
-
test
public boolean test(ServerWorld world, @Nullable @Nullable Vec3d pos, @Nullable @Nullable Entity entity) - Mappings:
Namespace Name Mixin selector named testLnet/minecraft/predicate/entity/EntityPredicate;test(Lnet/minecraft/server/world/ServerWorld;Lnet/minecraft/util/math/Vec3d;Lnet/minecraft/entity/Entity;)Zintermediary method_8909Lnet/minecraft/class_2048;method_8909(Lnet/minecraft/class_3218;Lnet/minecraft/class_243;Lnet/minecraft/class_1297;)Zofficial aLbv;a(Laqu;Lexc;Lbsr;)Z
-
createAdvancementEntityLootContext
public static LootContext createAdvancementEntityLootContext(ServerPlayerEntity player, Entity target) - Mappings:
Namespace Name Mixin selector named createAdvancementEntityLootContextLnet/minecraft/predicate/entity/EntityPredicate;createAdvancementEntityLootContext(Lnet/minecraft/server/network/ServerPlayerEntity;Lnet/minecraft/entity/Entity;)Lnet/minecraft/loot/context/LootContext;intermediary method_27802Lnet/minecraft/class_2048;method_27802(Lnet/minecraft/class_3222;Lnet/minecraft/class_1297;)Lnet/minecraft/class_47;official bLbv;b(Laqv;Lbsr;)Lerr;
-
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 thetyperecord component.- Returns:
- the value of the
typerecord component
-
distance
Returns the value of thedistancerecord component.- Returns:
- the value of the
distancerecord component
-
movement
Returns the value of themovementrecord component.- Returns:
- the value of the
movementrecord component
-
location
Returns the value of thelocationrecord component.- Returns:
- the value of the
locationrecord component
-
effects
Returns the value of theeffectsrecord component.- Returns:
- the value of the
effectsrecord component
-
nbt
Returns the value of thenbtrecord component.- Returns:
- the value of the
nbtrecord component
-
flags
Returns the value of theflagsrecord component.- Returns:
- the value of the
flagsrecord component
-
equipment
Returns the value of theequipmentrecord component.- Returns:
- the value of the
equipmentrecord component
-
typeSpecific
Returns the value of thetypeSpecificrecord component.- Returns:
- the value of the
typeSpecificrecord component
-
periodicTick
Returns the value of theperiodicTickrecord component.- Returns:
- the value of the
periodicTickrecord component
-
vehicle
Returns the value of thevehiclerecord component.- Returns:
- the value of the
vehiclerecord component
-
passenger
Returns the value of thepassengerrecord component.- Returns:
- the value of the
passengerrecord component
-
targetedEntity
Returns the value of thetargetedEntityrecord component.- Returns:
- the value of the
targetedEntityrecord component
-
team
Returns the value of theteamrecord component.- Returns:
- the value of the
teamrecord component
-
slots
Returns the value of theslotsrecord component.- Returns:
- the value of the
slotsrecord component
-