Package net.minecraft.predicate.entity
Record Class DamageSourcePredicate
java.lang.Object
java.lang.Record
net.minecraft.predicate.entity.DamageSourcePredicate
- Record Components:
- -
- directEntity-
- sourceEntity-
- isDirect-
public record DamageSourcePredicate(List<TagPredicate<DamageType>> tags, Optional<EntityPredicate> directEntity, Optional<EntityPredicate> sourceEntity, Optional<Boolean> isDirect)
extends Record
- Mappings:
- Namespace - Name - named - net/minecraft/predicate/entity/DamageSourcePredicate- intermediary - net/minecraft/class_2022- official - bm- named - tags- intermediary - comp_1740- official - b- named - directEntity- intermediary - comp_1741- official - c- named - sourceEntity- intermediary - comp_1742- official - d- named - isDirect- intermediary - comp_2793- official - e
- 
Nested Class SummaryNested Classes
- 
Field SummaryFieldsModifier and TypeFieldDescriptionstatic final com.mojang.serialization.Codec<DamageSourcePredicate> private final Optional<EntityPredicate> The field for thedirectEntityrecord component.The field for theisDirectrecord component.private final Optional<EntityPredicate> The field for thesourceEntityrecord component.private final List<TagPredicate<DamageType>> The field for thetagsrecord component.
- 
Constructor SummaryConstructorsConstructorDescriptionDamageSourcePredicate(List<TagPredicate<DamageType>> tagPredicates, Optional<EntityPredicate> optional, Optional<EntityPredicate> optional2, Optional<Boolean> optional3) 
- 
Method SummaryModifier and TypeMethodDescriptionReturns the value of thedirectEntityrecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.isDirect()Returns the value of theisDirectrecord component.Returns the value of thesourceEntityrecord component.tags()Returns the value of thetagsrecord component.booleantest(ServerPlayerEntity player, DamageSource damageSource) booleantest(ServerWorld world, Vec3d pos, DamageSource damageSource) final StringtoString()Returns a string representation of this record class.
- 
Field Details- 
tagsThe field for thetagsrecord component.
- 
directEntityThe field for thedirectEntityrecord component.
- 
sourceEntityThe field for thesourceEntityrecord component.
- 
isDirectThe field for theisDirectrecord component.
- 
CODEC- Mappings:
- Namespace - Name - Mixin selector - named - CODEC- Lnet/minecraft/predicate/entity/DamageSourcePredicate;CODEC:Lcom/mojang/serialization/Codec;- intermediary - field_45727- Lnet/minecraft/class_2022;field_45727:Lcom/mojang/serialization/Codec;- official - a- Lbm;a:Lcom/mojang/serialization/Codec;
 
 
- 
- 
Constructor Details- 
DamageSourcePredicatepublic DamageSourcePredicate(List<TagPredicate<DamageType>> tagPredicates, Optional<EntityPredicate> optional, Optional<EntityPredicate> optional2, Optional<Boolean> optional3) - Mappings:
- Namespace - Name - Mixin selector - named - <init>- Lnet/minecraft/predicate/entity/DamageSourcePredicate;<init>(Ljava/util/List;Ljava/util/Optional;Ljava/util/Optional;Ljava/util/Optional;)V- intermediary - <init>- Lnet/minecraft/class_2022;<init>(Ljava/util/List;Ljava/util/Optional;Ljava/util/Optional;Ljava/util/Optional;)V- official - <init>- Lbm;<init>(Ljava/util/List;Ljava/util/Optional;Ljava/util/Optional;Ljava/util/Optional;)V
 
 
- 
- 
Method Details- 
test- Mappings:
- Namespace - Name - Mixin selector - named - test- Lnet/minecraft/predicate/entity/DamageSourcePredicate;test(Lnet/minecraft/server/network/ServerPlayerEntity;Lnet/minecraft/entity/damage/DamageSource;)Z- intermediary - method_8847- Lnet/minecraft/class_2022;method_8847(Lnet/minecraft/class_3222;Lnet/minecraft/class_1282;)Z- official - a- Lbm;a(Lare;Lbtc;)Z
 
- 
test- Mappings:
- Namespace - Name - Mixin selector - named - test- Lnet/minecraft/predicate/entity/DamageSourcePredicate;test(Lnet/minecraft/server/world/ServerWorld;Lnet/minecraft/util/math/Vec3d;Lnet/minecraft/entity/damage/DamageSource;)Z- intermediary - method_8845- Lnet/minecraft/class_2022;method_8845(Lnet/minecraft/class_3218;Lnet/minecraft/class_243;Lnet/minecraft/class_1282;)Z- official - a- Lbm;a(Lard;Lfbb;Lbtc;)Z
 
- 
toStringReturns 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.
- 
hashCodepublic 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.
- 
equalsIndicates 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).
- 
tagsReturns the value of thetagsrecord component.- Returns:
- the value of the tagsrecord component
 
- 
directEntityReturns the value of thedirectEntityrecord component.- Returns:
- the value of the directEntityrecord component
 
- 
sourceEntityReturns the value of thesourceEntityrecord component.- Returns:
- the value of the sourceEntityrecord component
 
- 
isDirectReturns the value of theisDirectrecord component.- Returns:
- the value of the isDirectrecord component
 
 
-