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(RegistryKey<DamageType> damageType, LevelBasedValue minDamage, LevelBasedValue maxDamage)
extends Record
implements EntityEffect, LocationEffect
-
Nested Class Summary
Nested classes/interfaces inherited from interface 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.SummonEntityNested classes/interfaces inherited from interface LocationEffect
LocationEffect.AllOf -
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionDamageEntity(RegistryKey<DamageType> damageType, LevelBasedValue minDamage, LevelBasedValue maxDamage) Creates an instance of aDamageEntityrecord class. -
Method Summary
Modifier and TypeMethodDescriptioncodec()Returns the value of thedamageTyperecord 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 themaxDamagerecord component.Returns the value of theminDamagerecord component.final StringtoString()Returns a string representation of this record class.
-
Field Details
-
CODEC
-
-
Constructor Details
-
DamageEntity
public DamageEntity(RegistryKey<DamageType> damageType, LevelBasedValue minDamage, LevelBasedValue maxDamage) Creates an instance of aDamageEntityrecord class.- Parameters:
damageType- the value for thedamageTyperecord componentminDamage- the value for theminDamagerecord componentmaxDamage- the value for themaxDamagerecord component
-
-
Method Details
-
codec
- Specified by:
codecin interfaceEntityEffect- Specified by:
codecin interfaceLocationEffect
-
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. All components in this record class are compared withObjects::equals(Object,Object). -
damageType
Returns the value of thedamageTyperecord component.- Returns:
- the value of the
damageTyperecord component
-
minDamage
Returns the value of theminDamagerecord component.- Returns:
- the value of the
minDamagerecord component
-
maxDamage
Returns the value of themaxDamagerecord component.- Returns:
- the value of the
maxDamagerecord component
-