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 bj
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 Summary
-
Field Summary
Modifier and TypeFieldDescriptionThe field for theblocked
record component.static final com.mojang.serialization.Codec
<DamagePredicate> private final NumberRange.DoubleRange
The field for thedealt
record component.private final Optional
<EntityPredicate> The field for thesourceEntity
record component.private final NumberRange.DoubleRange
The field for thetaken
record component.private final Optional
<DamageSourcePredicate> The field for thetype
record component. -
Constructor Summary
ConstructorDescriptionDamagePredicate
(NumberRange.DoubleRange dealt, NumberRange.DoubleRange taken, Optional<EntityPredicate> optional, Optional<Boolean> optional2, Optional<DamageSourcePredicate> optional3) -
Method Summary
Modifier and TypeMethodDescriptionblocked()
Returns the value of theblocked
record component.dealt()
Returns the value of thedealt
record component.final boolean
Indicates whether some other object is "equal to" this one.final int
hashCode()
Returns a hash code value for this object.Returns the value of thesourceEntity
record component.taken()
Returns the value of thetaken
record component.boolean
test
(ServerPlayerEntity player, DamageSource source, float dealt, float taken, boolean blocked) final String
toString()
Returns a string representation of this record class.type()
Returns the value of thetype
record component.
-
Field Details
-
dealt
The field for thedealt
record component. -
taken
The field for thetaken
record component. -
sourceEntity
The field for thesourceEntity
record component. -
blocked
The field for theblocked
record component. -
type
The field for thetype
record 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
Lbj;a:Lcom/mojang/serialization/Codec;
-
-
Constructor Details
-
DamagePredicate
public 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>
Lbj;<init>(Ldh$c;Ldh$c;Ljava/util/Optional;Ljava/util/Optional;Ljava/util/Optional;)V
-
-
Method Details
-
test
public 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
Lbj;a(Laqv;Lbrk;FFZ)Z
-
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)
. -
dealt
Returns the value of thedealt
record component.- Returns:
- the value of the
dealt
record component
-
taken
Returns the value of thetaken
record component.- Returns:
- the value of the
taken
record component
-
sourceEntity
Returns the value of thesourceEntity
record component.- Returns:
- the value of the
sourceEntity
record component
-
blocked
Returns the value of theblocked
record component.- Returns:
- the value of the
blocked
record component
-
type
Returns the value of thetype
record component.- Returns:
- the value of the
type
record component
-