Package net.minestom.server.item.enchant
Record Class EntityEffect.DamageEntity
java.lang.Object
java.lang.Record
net.minestom.server.item.enchant.EntityEffect.DamageEntity
- All Implemented Interfaces:
Enchantment.Effect
,EntityEffect
,LocationEffect
- Enclosing interface:
EntityEffect
public static record EntityEffect.DamageEntity(DynamicRegistry.Key<DamageType> damageType, @NotNull LevelBasedValue minDamage, @NotNull LevelBasedValue maxDamage)
extends Record
implements EntityEffect, LocationEffect
-
Nested Class Summary
Nested classes/interfaces inherited from interface net.minestom.server.item.enchant.EntityEffect
EntityEffect.AllOf, EntityEffect.ApplyPotionEffect, EntityEffect.ChangeItemDamage, EntityEffect.DamageEntity, EntityEffect.Explode, EntityEffect.Ignite, EntityEffect.PlaySound, EntityEffect.ReplaceBlock, EntityEffect.ReplaceDisc, EntityEffect.RunFunction, EntityEffect.SetBlockProperties, EntityEffect.SpawnParticles, EntityEffect.SummonEntity
Nested classes/interfaces inherited from interface net.minestom.server.item.enchant.LocationEffect
LocationEffect.AllOf
-
Field Summary
-
Constructor Summary
ConstructorDescriptionDamageEntity
(DynamicRegistry.Key<DamageType> damageType, @NotNull LevelBasedValue minDamage, @NotNull LevelBasedValue maxDamage) Creates an instance of aDamageEntity
record class. -
Method Summary
Modifier and TypeMethodDescriptionReturns the value of thedamageType
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.@NotNull LevelBasedValue
Returns the value of themaxDamage
record component.@NotNull LevelBasedValue
Returns the value of theminDamage
record component.@NotNull BinaryTagSerializer
<EntityEffect.DamageEntity> nbtType()
final String
toString()
Returns a string representation of this record class.
-
Field Details
-
NBT_TYPE
-
-
Constructor Details
-
DamageEntity
public DamageEntity(@NotNull DynamicRegistry.Key<DamageType> damageType, @NotNull @NotNull LevelBasedValue minDamage, @NotNull @NotNull LevelBasedValue maxDamage) Creates an instance of aDamageEntity
record class.- Parameters:
damageType
- the value for thedamageType
record componentminDamage
- the value for theminDamage
record componentmaxDamage
- the value for themaxDamage
record component
-
-
Method Details
-
nbtType
- Specified by:
nbtType
in interfaceEntityEffect
- Specified by:
nbtType
in interfaceLocationEffect
-
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)
. -
damageType
Returns the value of thedamageType
record component.- Returns:
- the value of the
damageType
record component
-
minDamage
Returns the value of theminDamage
record component.- Returns:
- the value of the
minDamage
record component
-
maxDamage
Returns the value of themaxDamage
record component.- Returns:
- the value of the
maxDamage
record component
-