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/DamagePredicateintermediary net/minecraft/class_2019official bjnamed dealtintermediary comp_1735official bnamed takenintermediary comp_1736official cnamed sourceEntityintermediary comp_1737official dnamed blockedintermediary comp_1738official enamed typeintermediary comp_1739official f
-
Nested Class Summary
Nested Classes -
Field Summary
FieldsModifier 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 Summary
ConstructorsConstructorDescriptionDamagePredicate(NumberRange.DoubleRange dealt, NumberRange.DoubleRange taken, Optional<EntityPredicate> optional, Optional<Boolean> optional2, Optional<DamageSourcePredicate> optional3) -
Method Summary
Modifier 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
-
dealt
The field for thedealtrecord component. -
taken
The field for thetakenrecord component. -
sourceEntity
The field for thesourceEntityrecord component. -
blocked
The field for theblockedrecord component. -
type
The field for thetyperecord component. -
CODEC
- Mappings:
Namespace Name Mixin selector named CODECLnet/minecraft/predicate/DamagePredicate;CODEC:Lcom/mojang/serialization/Codec;intermediary field_47238Lnet/minecraft/class_2019;field_47238:Lcom/mojang/serialization/Codec;official aLbj;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;)Vintermediary <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;)Vofficial <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 testLnet/minecraft/predicate/DamagePredicate;test(Lnet/minecraft/server/network/ServerPlayerEntity;Lnet/minecraft/entity/damage/DamageSource;FFZ)Zintermediary method_8838Lnet/minecraft/class_2019;method_8838(Lnet/minecraft/class_3222;Lnet/minecraft/class_1282;FFZ)Zofficial aLbj;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 thedealtrecord component.- Returns:
- the value of the
dealtrecord component
-
taken
Returns the value of thetakenrecord component.- Returns:
- the value of the
takenrecord component
-
sourceEntity
Returns the value of thesourceEntityrecord component.- Returns:
- the value of the
sourceEntityrecord component
-
blocked
Returns the value of theblockedrecord component.- Returns:
- the value of the
blockedrecord component
-
type
Returns the value of thetyperecord component.- Returns:
- the value of the
typerecord component
-