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 bointermediary net/minecraft/class_2048named net/minecraft/predicate/entity/EntityPredicateofficial bintermediary comp_1761named typeofficial cintermediary comp_1762named distanceofficial dintermediary comp_1763named locationofficial eintermediary comp_1764named steppingOnofficial fintermediary comp_1765named effectsofficial gintermediary comp_1766named nbtofficial hintermediary comp_1767named flagsofficial iintermediary comp_1768named equipmentofficial jintermediary comp_1769named typeSpecificofficial kintermediary comp_1770named vehicleofficial lintermediary comp_1771named passengerofficial mintermediary comp_1772named targetedEntityofficial nintermediary comp_1773named team
-
Nested Class Summary
Nested Classes -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate 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.static final com.mojang.serialization.Codec<EntityPredicate>private final Optional<EntityFlagsPredicate>The field for theflagsrecord component.private final Optional<LocationPredicate>The field for thelocationrecord component.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 List<LootContextPredicate>contextPredicateArrayFromJson(JsonObject json, String key, AdvancementEntityPredicateDeserializer predicateDeserializer) static Optional<LootContextPredicate>contextPredicateFromJson(JsonObject json, String key, AdvancementEntityPredicateDeserializer predicateDeserializer) private static Optional<LootContextPredicate>contextPredicateFromJsonElement(String key, AdvancementEntityPredicateDeserializer predicateDeserializer, @Nullable JsonElement json) 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.static Optional<EntityPredicate>fromJson(@Nullable JsonElement json) final inthashCode()Returns a hash code value for this object.location()Returns the value of thelocationrecord component.static Optional<LootContextPredicate>method_53134(EntityPredicate.Builder builder) static Optional<LootContextPredicate>method_53137(Optional<EntityPredicate> optional) static Optional<EntityPredicate>method_53138(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) static List<LootContextPredicate>method_53139(EntityPredicate.Builder[] builder) 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) booleantoJson()final 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. -
field_45746
- Mappings:
Namespace Name Mixin selector official aLbo;a:Lcom/mojang/serialization/Codec;intermediary field_45746Lnet/minecraft/class_2048;field_45746:Lcom/mojang/serialization/Codec;named field_45746Lnet/minecraft/predicate/entity/EntityPredicate;field_45746: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
-
method_53138
public static Optional<EntityPredicate> method_53138(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) - Mappings:
Namespace Name Mixin selector official aLbo;a(Ljava/util/Optional;Ljava/util/Optional;Ljava/util/Optional;Ljava/util/Optional;Ljava/util/Optional;Ljava/util/Optional;Ljava/util/Optional;Ljava/util/Optional;Ljava/util/Optional;Ljava/util/Optional;Ljava/util/Optional;Ljava/util/Optional;Ljava/util/Optional;)Ljava/util/Optional;intermediary method_53138Lnet/minecraft/class_2048;method_53138(Ljava/util/Optional;Ljava/util/Optional;Ljava/util/Optional;Ljava/util/Optional;Ljava/util/Optional;Ljava/util/Optional;Ljava/util/Optional;Ljava/util/Optional;Ljava/util/Optional;Ljava/util/Optional;Ljava/util/Optional;Ljava/util/Optional;Ljava/util/Optional;)Ljava/util/Optional;named method_53138Lnet/minecraft/predicate/entity/EntityPredicate;method_53138(Ljava/util/Optional;Ljava/util/Optional;Ljava/util/Optional;Ljava/util/Optional;Ljava/util/Optional;Ljava/util/Optional;Ljava/util/Optional;Ljava/util/Optional;Ljava/util/Optional;Ljava/util/Optional;Ljava/util/Optional;Ljava/util/Optional;Ljava/util/Optional;)Ljava/util/Optional;
-
contextPredicateFromJson
public static Optional<LootContextPredicate> contextPredicateFromJson(JsonObject json, String key, AdvancementEntityPredicateDeserializer predicateDeserializer) - Mappings:
Namespace Name Mixin selector official aLbo;a(Lcom/google/gson/JsonObject;Ljava/lang/String;Lbe;)Ljava/util/Optional;intermediary method_51705Lnet/minecraft/class_2048;method_51705(Lcom/google/gson/JsonObject;Ljava/lang/String;Lnet/minecraft/class_5257;)Ljava/util/Optional;named contextPredicateFromJsonLnet/minecraft/predicate/entity/EntityPredicate;contextPredicateFromJson(Lcom/google/gson/JsonObject;Ljava/lang/String;Lnet/minecraft/predicate/entity/AdvancementEntityPredicateDeserializer;)Ljava/util/Optional;
-
contextPredicateArrayFromJson
public static List<LootContextPredicate> contextPredicateArrayFromJson(JsonObject json, String key, AdvancementEntityPredicateDeserializer predicateDeserializer) - Mappings:
Namespace Name Mixin selector official bLbo;b(Lcom/google/gson/JsonObject;Ljava/lang/String;Lbe;)Ljava/util/List;intermediary method_51707Lnet/minecraft/class_2048;method_51707(Lcom/google/gson/JsonObject;Ljava/lang/String;Lnet/minecraft/class_5257;)Ljava/util/List;named contextPredicateArrayFromJsonLnet/minecraft/predicate/entity/EntityPredicate;contextPredicateArrayFromJson(Lcom/google/gson/JsonObject;Ljava/lang/String;Lnet/minecraft/predicate/entity/AdvancementEntityPredicateDeserializer;)Ljava/util/List;
-
contextPredicateFromJsonElement
private static Optional<LootContextPredicate> contextPredicateFromJsonElement(String key, AdvancementEntityPredicateDeserializer predicateDeserializer, @Nullable @Nullable JsonElement json) - Mappings:
Namespace Name Mixin selector official aLbo;a(Ljava/lang/String;Lbe;Lcom/google/gson/JsonElement;)Ljava/util/Optional;intermediary method_51706Lnet/minecraft/class_2048;method_51706(Ljava/lang/String;Lnet/minecraft/class_5257;Lcom/google/gson/JsonElement;)Ljava/util/Optional;named contextPredicateFromJsonElementLnet/minecraft/predicate/entity/EntityPredicate;contextPredicateFromJsonElement(Ljava/lang/String;Lnet/minecraft/predicate/entity/AdvancementEntityPredicateDeserializer;Lcom/google/gson/JsonElement;)Ljava/util/Optional;
-
method_53134
- Mappings:
Namespace Name Mixin selector official aLbo;a(Lbo$a;)Ljava/util/Optional;intermediary method_53134Lnet/minecraft/class_2048;method_53134(Lnet/minecraft/class_2048$class_2049;)Ljava/util/Optional;named method_53134Lnet/minecraft/predicate/entity/EntityPredicate;method_53134(Lnet/minecraft/predicate/entity/EntityPredicate$Builder;)Ljava/util/Optional;
-
method_53137
- Mappings:
Namespace Name Mixin selector official aLbo;a(Ljava/util/Optional;)Ljava/util/Optional;intermediary method_53137Lnet/minecraft/class_2048;method_53137(Ljava/util/Optional;)Ljava/util/Optional;named method_53137Lnet/minecraft/predicate/entity/EntityPredicate;method_53137(Ljava/util/Optional;)Ljava/util/Optional;
-
method_53139
- Mappings:
Namespace Name Mixin selector official aLbo;a([Lbo$a;)Ljava/util/List;intermediary method_53139Lnet/minecraft/class_2048;method_53139([Lnet/minecraft/class_2048$class_2049;)Ljava/util/List;named method_53139Lnet/minecraft/predicate/entity/EntityPredicate;method_53139([Lnet/minecraft/predicate/entity/EntityPredicate$Builder;)Ljava/util/List;
-
asLootContextPredicate
- Mappings:
Namespace Name Mixin selector official aLbo;a(Lbo;)Lba;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 aLbo;a(Lakl;Lbii;)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 serverWorld, @Nullable @Nullable Vec3d vec3d, @Nullable @Nullable Entity entity) - Mappings:
Namespace Name Mixin selector official aLbo;a(Lakk;Lehe;Lbii;)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
-
fromJson
- Mappings:
Namespace Name Mixin selector official aLbo;a(Lcom/google/gson/JsonElement;)Ljava/util/Optional;intermediary method_8913Lnet/minecraft/class_2048;method_8913(Lcom/google/gson/JsonElement;)Ljava/util/Optional;named fromJsonLnet/minecraft/predicate/entity/EntityPredicate;fromJson(Lcom/google/gson/JsonElement;)Ljava/util/Optional;
-
toJson
- Mappings:
Namespace Name Mixin selector official aLbo;a()Lcom/google/gson/JsonElement;intermediary method_8912Lnet/minecraft/class_2048;method_8912()Lcom/google/gson/JsonElement;named toJsonLnet/minecraft/predicate/entity/EntityPredicate;toJson()Lcom/google/gson/JsonElement;
-
createAdvancementEntityLootContext
public static LootContext createAdvancementEntityLootContext(ServerPlayerEntity player, Entity target) - Mappings:
Namespace Name Mixin selector official bLbo;b(Lakl;Lbii;)Lech;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
-