Package net.minecraft.predicate.entity
Record Class EntityPredicate
java.lang.Object
java.lang.Record
net.minecraft.predicate.entity.EntityPredicate
- Record Components:
type-distance-location-steppingOn-effects-nbt-flags-equipment-typeSpecific-vehicle-passenger-targetedEntity-team-
public record EntityPredicate(Optional<EntityTypePredicate> type, Optional<DistancePredicate> distance, Optional<LocationPredicate> location, Optional<LocationPredicate> steppingOn, Optional<EntityEffectPredicate> effects, Optional<NbtPredicate> nbt, Optional<EntityFlagsPredicate> flags, Optional<EntityEquipmentPredicate> equipment, Optional<TypeSpecificPredicate> typeSpecific, Optional<EntityPredicate> vehicle, Optional<EntityPredicate> passenger, Optional<EntityPredicate> targetedEntity, Optional<String> team)
extends Record
- Mappings:
Namespace Name official bpintermediary net/minecraft/class_2048named net/minecraft/predicate/entity/EntityPredicateofficial cintermediary comp_1761named typeofficial dintermediary comp_1762named distanceofficial eintermediary comp_1763named locationofficial fintermediary comp_1764named steppingOnofficial gintermediary comp_1765named effectsofficial hintermediary comp_1766named nbtofficial iintermediary comp_1767named flagsofficial jintermediary comp_1768named equipmentofficial kintermediary comp_1769named typeSpecificofficial lintermediary comp_1770named vehicleofficial mintermediary comp_1771named passengerofficial nintermediary comp_1772named targetedEntityofficial ointermediary comp_1773named team
-
Nested Class Summary
Nested Classes -
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 Optional<LocationPredicate>The field for thelocationrecord component.static final com.mojang.serialization.Codec<LootContextPredicate>private final Optional<NbtPredicate>The field for thenbtrecord component.private final Optional<EntityPredicate>The field for thepassengerrecord component.private final Optional<LocationPredicate>The field for thesteppingOnrecord 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<TypeSpecificPredicate>The field for thetypeSpecificrecord component.private final Optional<EntityPredicate>The field for thevehiclerecord component. -
Constructor Summary
ConstructorsConstructorDescriptionEntityPredicate(Optional<EntityTypePredicate> optional, Optional<DistancePredicate> optional2, Optional<LocationPredicate> optional3, Optional<LocationPredicate> optional4, Optional<EntityEffectPredicate> optional5, Optional<NbtPredicate> optional6, Optional<EntityFlagsPredicate> optional7, Optional<EntityEquipmentPredicate> optional8, Optional<TypeSpecificPredicate> optional9, Optional<EntityPredicate> optional10, Optional<EntityPredicate> optional11, Optional<EntityPredicate> optional12, Optional<String> optional13) -
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.nbt()Returns the value of thenbtrecord component.Returns the value of thepassengerrecord component.Returns the value of thesteppingOnrecord 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. -
location
The field for thelocationrecord component. -
steppingOn
The field for thesteppingOnrecord 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. -
vehicle
The field for thevehiclerecord component. -
passenger
The field for thepassengerrecord component. -
targetedEntity
The field for thetargetedEntityrecord component. -
team
The field for theteamrecord component. -
CODEC
- Mappings:
Namespace Name Mixin selector official aLbp;a:Lcom/mojang/serialization/Codec;intermediary field_45746Lnet/minecraft/class_2048;field_45746:Lcom/mojang/serialization/Codec;named CODECLnet/minecraft/predicate/entity/EntityPredicate;CODEC: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 official bLbp;b:Lcom/mojang/serialization/Codec;intermediary field_47250Lnet/minecraft/class_2048;field_47250:Lcom/mojang/serialization/Codec;named LOOT_CONTEXT_PREDICATE_CODECLnet/minecraft/predicate/entity/EntityPredicate;LOOT_CONTEXT_PREDICATE_CODEC:Lcom/mojang/serialization/Codec;
-
-
Constructor Details
-
EntityPredicate
public EntityPredicate(Optional<EntityTypePredicate> optional, Optional<DistancePredicate> optional2, Optional<LocationPredicate> optional3, Optional<LocationPredicate> optional4, Optional<EntityEffectPredicate> optional5, Optional<NbtPredicate> optional6, Optional<EntityFlagsPredicate> optional7, Optional<EntityEquipmentPredicate> optional8, Optional<TypeSpecificPredicate> optional9, Optional<EntityPredicate> optional10, Optional<EntityPredicate> optional11, Optional<EntityPredicate> optional12, Optional<String> optional13)
-
-
Method Details
-
contextPredicateFromEntityPredicate
public static LootContextPredicate contextPredicateFromEntityPredicate(EntityPredicate.Builder builder) - Mappings:
Namespace Name Mixin selector official aLbp;a(Lbp$a;)Lbb;intermediary method_53134Lnet/minecraft/class_2048;method_53134(Lnet/minecraft/class_2048$class_2049;)Lnet/minecraft/class_5258;named contextPredicateFromEntityPredicateLnet/minecraft/predicate/entity/EntityPredicate;contextPredicateFromEntityPredicate(Lnet/minecraft/predicate/entity/EntityPredicate$Builder;)Lnet/minecraft/predicate/entity/LootContextPredicate;
-
contextPredicateFromEntityPredicate
public static Optional<LootContextPredicate> contextPredicateFromEntityPredicate(Optional<EntityPredicate> entityPredicate) - Mappings:
Namespace Name Mixin selector official aLbp;a(Ljava/util/Optional;)Ljava/util/Optional;intermediary method_53137Lnet/minecraft/class_2048;method_53137(Ljava/util/Optional;)Ljava/util/Optional;named contextPredicateFromEntityPredicateLnet/minecraft/predicate/entity/EntityPredicate;contextPredicateFromEntityPredicate(Ljava/util/Optional;)Ljava/util/Optional;
-
contextPredicateFromEntityPredicates
public static List<LootContextPredicate> contextPredicateFromEntityPredicates(EntityPredicate.Builder[] builders) - Mappings:
Namespace Name Mixin selector official aLbp;a([Lbp$a;)Ljava/util/List;intermediary method_53139Lnet/minecraft/class_2048;method_53139([Lnet/minecraft/class_2048$class_2049;)Ljava/util/List;named contextPredicateFromEntityPredicatesLnet/minecraft/predicate/entity/EntityPredicate;contextPredicateFromEntityPredicates([Lnet/minecraft/predicate/entity/EntityPredicate$Builder;)Ljava/util/List;
-
asLootContextPredicate
- Mappings:
Namespace Name Mixin selector official aLbp;a(Lbp;)Lbb;intermediary method_51704Lnet/minecraft/class_2048;method_51704(Lnet/minecraft/class_2048;)Lnet/minecraft/class_5258;named asLootContextPredicateLnet/minecraft/predicate/entity/EntityPredicate;asLootContextPredicate(Lnet/minecraft/predicate/entity/EntityPredicate;)Lnet/minecraft/predicate/entity/LootContextPredicate;
-
test
- Mappings:
Namespace Name Mixin selector official aLbp;a(Lane;Lblv;)Zintermediary method_8914Lnet/minecraft/class_2048;method_8914(Lnet/minecraft/class_3222;Lnet/minecraft/class_1297;)Znamed testLnet/minecraft/predicate/entity/EntityPredicate;test(Lnet/minecraft/server/network/ServerPlayerEntity;Lnet/minecraft/entity/Entity;)Z
-
test
public boolean test(ServerWorld world, @Nullable @Nullable Vec3d pos, @Nullable @Nullable Entity entity) - Mappings:
Namespace Name Mixin selector official aLbp;a(Land;Lelt;Lblv;)Zintermediary method_8909Lnet/minecraft/class_2048;method_8909(Lnet/minecraft/class_3218;Lnet/minecraft/class_243;Lnet/minecraft/class_1297;)Znamed testLnet/minecraft/predicate/entity/EntityPredicate;test(Lnet/minecraft/server/world/ServerWorld;Lnet/minecraft/util/math/Vec3d;Lnet/minecraft/entity/Entity;)Z
-
createAdvancementEntityLootContext
public static LootContext createAdvancementEntityLootContext(ServerPlayerEntity player, Entity target) - Mappings:
Namespace Name Mixin selector official bLbp;b(Lane;Lblv;)Legw;intermediary method_27802Lnet/minecraft/class_2048;method_27802(Lnet/minecraft/class_3222;Lnet/minecraft/class_1297;)Lnet/minecraft/class_47;named createAdvancementEntityLootContextLnet/minecraft/predicate/entity/EntityPredicate;createAdvancementEntityLootContext(Lnet/minecraft/server/network/ServerPlayerEntity;Lnet/minecraft/entity/Entity;)Lnet/minecraft/loot/context/LootContext;
-
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
-
location
Returns the value of thelocationrecord component.- Returns:
- the value of the
locationrecord component
-
steppingOn
Returns the value of thesteppingOnrecord component.- Returns:
- the value of the
steppingOnrecord 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
-
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
-