Package net.minecraft.predicate
Record Class DamagePredicate
java.lang.Object
java.lang.Record
net.minecraft.predicate.DamagePredicate
- Record Components:
- dealt-
- taken-
- sourceEntity-
- blocked-
- type-
public record DamagePredicate(NumberRange.DoubleRange dealt, NumberRange.DoubleRange taken, Optional<EntityPredicate> sourceEntity, Optional<Boolean> blocked, Optional<DamageSourcePredicate> type)
extends Record
- Mappings:
- Namespace - Name - named - net/minecraft/predicate/DamagePredicate- intermediary - net/minecraft/class_2019- official - bl- named - dealt- intermediary - comp_1735- official - b- named - taken- intermediary - comp_1736- official - c- named - sourceEntity- intermediary - comp_1737- official - d- named - blocked- intermediary - comp_1738- official - e- named - type- intermediary - comp_1739- official - f
- 
Nested Class SummaryNested Classes
- 
Field SummaryFieldsModifier and TypeFieldDescriptionThe field for theblockedrecord component.static final com.mojang.serialization.Codec<DamagePredicate> private final NumberRange.DoubleRangeThe field for thedealtrecord component.private final Optional<EntityPredicate> The field for thesourceEntityrecord component.private final NumberRange.DoubleRangeThe field for thetakenrecord component.private final Optional<DamageSourcePredicate> The field for thetyperecord component.
- 
Constructor SummaryConstructorsConstructorDescriptionDamagePredicate(NumberRange.DoubleRange dealt, NumberRange.DoubleRange taken, Optional<EntityPredicate> optional, Optional<Boolean> optional2, Optional<DamageSourcePredicate> optional3) 
- 
Method SummaryModifier and TypeMethodDescriptionblocked()Returns the value of theblockedrecord component.dealt()Returns the value of thedealtrecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.Returns the value of thesourceEntityrecord component.taken()Returns the value of thetakenrecord component.booleantest(ServerPlayerEntity player, DamageSource source, float dealt, float taken, boolean blocked) final StringtoString()Returns a string representation of this record class.type()Returns the value of thetyperecord component.
- 
Field Details- 
dealtThe field for thedealtrecord component.
- 
takenThe field for thetakenrecord component.
- 
sourceEntityThe field for thesourceEntityrecord component.
- 
blockedThe field for theblockedrecord component.
- 
typeThe field for thetyperecord component.
- 
CODEC- Mappings:
- Namespace - Name - Mixin selector - named - CODEC- Lnet/minecraft/predicate/DamagePredicate;CODEC:Lcom/mojang/serialization/Codec;- intermediary - field_47238- Lnet/minecraft/class_2019;field_47238:Lcom/mojang/serialization/Codec;- official - a- Lbl;a:Lcom/mojang/serialization/Codec;
 
 
- 
- 
Constructor Details- 
DamagePredicatepublic DamagePredicate(NumberRange.DoubleRange dealt, NumberRange.DoubleRange taken, Optional<EntityPredicate> optional, Optional<Boolean> optional2, Optional<DamageSourcePredicate> optional3) - Mappings:
- Namespace - Name - Mixin selector - named - <init>- Lnet/minecraft/predicate/DamagePredicate;<init>(Lnet/minecraft/predicate/NumberRange$DoubleRange;Lnet/minecraft/predicate/NumberRange$DoubleRange;Ljava/util/Optional;Ljava/util/Optional;Ljava/util/Optional;)V- intermediary - <init>- Lnet/minecraft/class_2019;<init>(Lnet/minecraft/class_2096$class_2099;Lnet/minecraft/class_2096$class_2099;Ljava/util/Optional;Ljava/util/Optional;Ljava/util/Optional;)V- official - <init>- Lbl;<init>(Ldk$c;Ldk$c;Ljava/util/Optional;Ljava/util/Optional;Ljava/util/Optional;)V
 
 
- 
- 
Method Details- 
testpublic boolean test(ServerPlayerEntity player, DamageSource source, float dealt, float taken, boolean blocked) - Mappings:
- Namespace - Name - Mixin selector - named - test- Lnet/minecraft/predicate/DamagePredicate;test(Lnet/minecraft/server/network/ServerPlayerEntity;Lnet/minecraft/entity/damage/DamageSource;FFZ)Z- intermediary - method_8838- Lnet/minecraft/class_2019;method_8838(Lnet/minecraft/class_3222;Lnet/minecraft/class_1282;FFZ)Z- official - a- Lbl;a(Lare;Lbtc;FFZ)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).
- 
dealtReturns the value of thedealtrecord component.- Returns:
- the value of the dealtrecord component
 
- 
takenReturns the value of thetakenrecord component.- Returns:
- the value of the takenrecord component
 
- 
sourceEntityReturns the value of thesourceEntityrecord component.- Returns:
- the value of the sourceEntityrecord component
 
- 
blockedReturns the value of theblockedrecord component.- Returns:
- the value of the blockedrecord component
 
- 
typeReturns the value of thetyperecord component.- Returns:
- the value of the typerecord component
 
 
-