Enum Class EntityDamageEvent.DamageCause
- All Implemented Interfaces:
Serializable
,Comparable<EntityDamageEvent.DamageCause>
,Constable
- Enclosing class:
EntityDamageEvent
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>>
-
Enum Constant Summary
Enum ConstantsEnum ConstantDescriptionDamage caused by being in the area when a block explodes.Damage caused when an entity steps onMaterial.CAMPFIRE
orMaterial.SOUL_CAMPFIRE
.Damage caused when an entity contacts a block such as a Cactus, Dripstone (Stalagmite) or Berry Bush.Damage caused when an entity is colliding with too many entities due to theGameRule.MAX_ENTITY_CRAMMING
.Custom damage.Deprecated.Damage caused by running out of air while in water.Damage caused when an entity that should be in water is not.Damage caused when an entity attacks another entity.Damage caused by being in the area when an entity, such as a Creeper, explodes.Damage caused when an entity attacks another entity in a sweep attack.Damage caused when an entity falls a distance greater than thesafe fall distance
.Damage caused by being hit by a falling block which deals damage.Damage caused by direct exposure to fire.Damage caused due to burns caused by fire.Damage caused when an entity runs into a wall.Damage caused from freezing.Damage caused when an entity steps onMaterial.MAGMA_BLOCK
.Damage caused by /kill command.Damage caused by direct exposure to lava.Damage caused by being struck by lightning.Damage caused by being hit by a damage potion or spell.Damage caused due to a snowman melting.Damage caused due to an ongoing poison effect.Damage caused when attacked by a projectile.Damage caused by the Sonic Boom attack fromWarden
.Damage caused by starving due to having an empty hunger bar.Damage caused by being put in a block.Damage caused by committing suicide.Damage caused in retaliation to another attack by theEnchantment.THORNS
enchantment or guardian.Damage caused by falling into the void.Damage caused by Wither potion effectDamage caused by the World Border. -
Method Summary
Modifier and TypeMethodDescriptionReturns the enum constant of this class with the specified name.static EntityDamageEvent.DamageCause[]
values()
Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
KILL
Damage caused by /kill command.Damage:
Float.MAX_VALUE
-
WORLD_BORDER
Damage caused by the World Border.Damage:
WorldBorder.getDamageAmount()
-
CONTACT
Damage caused when an entity contacts a block such as a Cactus, Dripstone (Stalagmite) or Berry Bush.Damage: variable
-
ENTITY_ATTACK
Damage caused when an entity attacks another entity.Damage: variable
-
ENTITY_SWEEP_ATTACK
Damage caused when an entity attacks another entity in a sweep attack.Damage: variable
-
PROJECTILE
Damage caused when attacked by a projectile.Damage: variable
-
SUFFOCATION
Damage caused by being put in a block.Damage: 1
-
FALL
Damage caused when an entity falls a distance greater than thesafe fall distance
.Damage: fall height -
safe fall distance
-
FIRE
Damage caused by direct exposure to fire.Damage: 1 or 2 (for soul fire)
-
FIRE_TICK
Damage caused due to burns caused by fire.Damage: 1
-
MELTING
Damage caused due to a snowman melting.Damage: 1
-
LAVA
Damage caused by direct exposure to lava.Damage: 4
-
DROWNING
Damage caused by running out of air while in water.Damage: 1 or 2
-
BLOCK_EXPLOSION
Damage caused by being in the area when a block explodes.Damage: variable
-
ENTITY_EXPLOSION
Damage caused by being in the area when an entity, such as a Creeper, explodes.Damage: variable
-
VOID
Damage caused by falling into the void.Damage:
World.getVoidDamageAmount()
-
LIGHTNING
Damage caused by being struck by lightning.Damage: 5 or
Float.MAX_VALUE
for turtle -
SUICIDE
Damage caused by committing suicide.Note: This is currently only used by plugins, default commands like /minecraft:kill use
KILL
to damage players.Damage: variable
-
STARVATION
Damage caused by starving due to having an empty hunger bar.Damage: 1
-
POISON
Damage caused due to an ongoing poison effect.Damage: 1
-
MAGIC
Damage caused by being hit by a damage potion or spell.Damage: variable
-
WITHER
Damage caused by Wither potion effect -
FALLING_BLOCK
Damage caused by being hit by a falling block which deals damage.Note: Not every block deals damage
Damage: variable
-
THORNS
Damage caused in retaliation to another attack by theEnchantment.THORNS
enchantment or guardian.Damage: 1-5 (thorns) or 2 (guardian)
-
DRAGON_BREATH
Deprecated.never used without help of commands or plugins,ENTITY_ATTACK
will be used insteadDamage caused by a dragon breathing fire.Damage: variable
-
FLY_INTO_WALL
Damage caused when an entity runs into a wall.Damage: variable
-
HOT_FLOOR
Damage caused when an entity steps onMaterial.MAGMA_BLOCK
.Damage: 1
-
CAMPFIRE
Damage caused when an entity steps onMaterial.CAMPFIRE
orMaterial.SOUL_CAMPFIRE
.Damage: 1 or 2 (for soul fire)
-
CRAMMING
Damage caused when an entity is colliding with too many entities due to theGameRule.MAX_ENTITY_CRAMMING
.Damage: 6
-
DRYOUT
Damage caused when an entity that should be in water is not.Damage: 1 or 2
-
FREEZE
Damage caused from freezing.Damage: 1 or 5 (for
sensitive
entities) -
SONIC_BOOM
Damage caused by the Sonic Boom attack fromWarden
.Damage: 10
-
CUSTOM
Custom damage.Damage: variable
-
-
Method Details
-
values
Returns an array containing the constants of this enum class, in the order they are declared.- Returns:
- an array containing the constants of this enum class, in the order they are declared
-
valueOf
Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (Extraneous whitespace characters are not permitted.)- Parameters:
name
- the name of the enum constant to be returned.- Returns:
- the enum constant with the specified name
- Throws:
IllegalArgumentException
- if this enum class has no constant with the specified nameNullPointerException
- if the argument is null
-
ENTITY_ATTACK
will be used instead