Record Class CombatEvent.Heal
java.lang.Object
java.lang.Record
cromveil.combatnumbers.events.CombatEvent.Heal
- All Implemented Interfaces:
CombatEvent
- Enclosing interface:
CombatEvent
public static record CombatEvent.Heal(net.minecraft.world.entity.LivingEntity entity, float amount, @Nullable net.minecraft.resources.Identifier type, Set<net.minecraft.resources.Identifier> flags)
extends Record
implements CombatEvent
-
Nested Class Summary
Nested classes/interfaces inherited from interface CombatEvent
CombatEvent.Damage, CombatEvent.Heal -
Field Summary
Fields inherited from interface CombatEvent
DAMAGE_KIND, GENERIC_HEAL, HEAL_KIND -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionfloatamount()Returns the value of theamountrecord component.net.minecraft.world.entity.LivingEntityentity()Returns the value of theentityrecord component.final booleanIndicates whether some other object is "equal to" this one.Set<net.minecraft.resources.Identifier> flags()Returns the value of theflagsrecord component.final inthashCode()Returns a hash code value for this object.net.minecraft.resources.Identifierkind()final StringtoString()Returns a string representation of this record class.@Nullable net.minecraft.resources.Identifiertype()Returns the value of thetyperecord component.Optional<net.minecraft.resources.Identifier> typeKey()floatvalue()
-
Constructor Details
-
Heal
public Heal(net.minecraft.world.entity.LivingEntity entity, float amount, @Nullable net.minecraft.resources.Identifier type, Set<net.minecraft.resources.Identifier> flags) Creates an instance of aHealrecord class.- Parameters:
entity- the value for theentityrecord componentamount- the value for theamountrecord componenttype- the value for thetyperecord componentflags- the value for theflagsrecord component
-
-
Method Details
-
kind
public net.minecraft.resources.Identifier kind()- Specified by:
kindin interfaceCombatEvent
-
value
public float value()- Specified by:
valuein interfaceCombatEvent
-
typeKey
- Specified by:
typeKeyin interfaceCombatEvent
-
toString
-
hashCode
-
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. Reference components are compared withObjects::equals(Object,Object); primitive components are compared with thecomparemethod from their corresponding wrapper classes. -
entity
public net.minecraft.world.entity.LivingEntity entity()Returns the value of theentityrecord component.- Specified by:
entityin interfaceCombatEvent- Returns:
- the value of the
entityrecord component
-
amount
public float amount()Returns the value of theamountrecord component.- Returns:
- the value of the
amountrecord component
-
type
public @Nullable net.minecraft.resources.Identifier type()Returns the value of thetyperecord component.- Returns:
- the value of the
typerecord component
-
flags
Returns the value of theflagsrecord component.- Specified by:
flagsin interfaceCombatEvent- Returns:
- the value of the
flagsrecord component
-