Package net.minecraft.predicate.entity
Record Class DamageSourcePredicate
java.lang.Object
java.lang.Record
net.minecraft.predicate.entity.DamageSourcePredicate
- Record Components:
tagPredicates-directEntity-sourceEntity-
public record DamageSourcePredicate(List<TagPredicate<DamageType>> tagPredicates, Optional<EntityPredicate> directEntity, Optional<EntityPredicate> sourceEntity)
extends Record
- Mappings:
Namespace Name official bdintermediary net/minecraft/class_2022named net/minecraft/predicate/entity/DamageSourcePredicateofficial bintermediary comp_1740named tagPredicatesofficial cintermediary comp_1741named directEntityofficial dintermediary comp_1742named sourceEntity
-
Nested Class Summary
Nested Classes -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final Optional<EntityPredicate>The field for thedirectEntityrecord component.static final com.mojang.serialization.Codec<DamageSourcePredicate>private final Optional<EntityPredicate>The field for thesourceEntityrecord component.private final List<TagPredicate<DamageType>>The field for thetagPredicatesrecord component. -
Constructor Summary
ConstructorsConstructorDescriptionDamageSourcePredicate(List<TagPredicate<DamageType>> tagPredicates, Optional<EntityPredicate> optional, Optional<EntityPredicate> optional2) -
Method Summary
Modifier and TypeMethodDescriptionReturns the value of thedirectEntityrecord component.final booleanIndicates whether some other object is "equal to" this one.static Optional<DamageSourcePredicate>fromJson(@Nullable JsonElement json) final inthashCode()Returns a hash code value for this object.(package private) static Optional<DamageSourcePredicate>method_53117(List<TagPredicate<DamageType>> list, Optional<EntityPredicate> optional, Optional<EntityPredicate> optional2) Returns the value of thesourceEntityrecord component.Returns the value of thetagPredicatesrecord component.booleantest(ServerPlayerEntity player, DamageSource damageSource) booleantest(ServerWorld serverWorld, Vec3d vec3d, DamageSource damageSource) toJson()final StringtoString()Returns a string representation of this record class.
-
Field Details
-
tagPredicates
The field for thetagPredicatesrecord component. -
directEntity
The field for thedirectEntityrecord component. -
sourceEntity
The field for thesourceEntityrecord component. -
field_45727
- Mappings:
Namespace Name Mixin selector official aLbd;a:Lcom/mojang/serialization/Codec;intermediary field_45727Lnet/minecraft/class_2022;field_45727:Lcom/mojang/serialization/Codec;named field_45727Lnet/minecraft/predicate/entity/DamageSourcePredicate;field_45727:Lcom/mojang/serialization/Codec;
-
-
Constructor Details
-
DamageSourcePredicate
public DamageSourcePredicate(List<TagPredicate<DamageType>> tagPredicates, Optional<EntityPredicate> optional, Optional<EntityPredicate> optional2) - Mappings:
Namespace Name Mixin selector official <init>Lbd;<init>(Ljava/util/List;Ljava/util/Optional;Ljava/util/Optional;)Vintermediary <init>Lnet/minecraft/class_2022;<init>(Ljava/util/List;Ljava/util/Optional;Ljava/util/Optional;)Vnamed <init>Lnet/minecraft/predicate/entity/DamageSourcePredicate;<init>(Ljava/util/List;Ljava/util/Optional;Ljava/util/Optional;)V
-
-
Method Details
-
method_53117
static Optional<DamageSourcePredicate> method_53117(List<TagPredicate<DamageType>> list, Optional<EntityPredicate> optional, Optional<EntityPredicate> optional2) - Mappings:
Namespace Name Mixin selector official aLbd;a(Ljava/util/List;Ljava/util/Optional;Ljava/util/Optional;)Ljava/util/Optional;intermediary method_53117Lnet/minecraft/class_2022;method_53117(Ljava/util/List;Ljava/util/Optional;Ljava/util/Optional;)Ljava/util/Optional;named method_53117Lnet/minecraft/predicate/entity/DamageSourcePredicate;method_53117(Ljava/util/List;Ljava/util/Optional;Ljava/util/Optional;)Ljava/util/Optional;
-
test
- Mappings:
Namespace Name Mixin selector official aLbd;a(Lakl;Lbhg;)Zintermediary method_8847Lnet/minecraft/class_2022;method_8847(Lnet/minecraft/class_3222;Lnet/minecraft/class_1282;)Znamed testLnet/minecraft/predicate/entity/DamageSourcePredicate;test(Lnet/minecraft/server/network/ServerPlayerEntity;Lnet/minecraft/entity/damage/DamageSource;)Z
-
test
- Mappings:
Namespace Name Mixin selector official aLbd;a(Lakk;Lehe;Lbhg;)Zintermediary method_8845Lnet/minecraft/class_2022;method_8845(Lnet/minecraft/class_3218;Lnet/minecraft/class_243;Lnet/minecraft/class_1282;)Znamed testLnet/minecraft/predicate/entity/DamageSourcePredicate;test(Lnet/minecraft/server/world/ServerWorld;Lnet/minecraft/util/math/Vec3d;Lnet/minecraft/entity/damage/DamageSource;)Z
-
fromJson
- Mappings:
Namespace Name Mixin selector official aLbd;a(Lcom/google/gson/JsonElement;)Ljava/util/Optional;intermediary method_8846Lnet/minecraft/class_2022;method_8846(Lcom/google/gson/JsonElement;)Ljava/util/Optional;named fromJsonLnet/minecraft/predicate/entity/DamageSourcePredicate;fromJson(Lcom/google/gson/JsonElement;)Ljava/util/Optional;
-
toJson
- Mappings:
Namespace Name Mixin selector official aLbd;a()Lcom/google/gson/JsonElement;intermediary method_8848Lnet/minecraft/class_2022;method_8848()Lcom/google/gson/JsonElement;named toJsonLnet/minecraft/predicate/entity/DamageSourcePredicate;toJson()Lcom/google/gson/JsonElement;
-
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). -
tagPredicates
Returns the value of thetagPredicatesrecord component.- Returns:
- the value of the
tagPredicatesrecord component
-
directEntity
Returns the value of thedirectEntityrecord component.- Returns:
- the value of the
directEntityrecord component
-
sourceEntity
Returns the value of thesourceEntityrecord component.- Returns:
- the value of the
sourceEntityrecord component
-