跳到主要内容

Enumeration: EntityDamageCause

Describes the source of damage from an Entity.

Enumeration Members

anvil

anvil: "anvil"

Remarks

Damage caused by a falling anvil.


blockExplosion

blockExplosion: "blockExplosion"

Remarks

Damage caused from a non-Entity explosion. For example, an exploding bed.


campfire

campfire: "campfire"


charging

charging: "charging"

Remarks

Unused.


contact

contact: "contact"

Remarks

Damage caused by physically touching an Entity or Block. For example, touching a Sweet Berry bush or Pufferfish.


drowning

drowning: "drowning"

Remarks

Damage caused by an Entity being out of air and inside a liquid block.


entityAttack

entityAttack: "entityAttack"

Remarks

Damage caused by an Entity attack.


entityExplosion

entityExplosion: "entityExplosion"

Remarks

Damage caused by an Entity explosion. For example, a Creeper or Wither.


fall

fall: "fall"

Remarks

Damage caused by falling onto the ground.


fallingBlock

fallingBlock: "fallingBlock"

Remarks

Damage caused by falling blocks. Note: Anvils and Stalactites have their own damage causes.


fire

fire: "fire"

Remarks

Damage caused by catching on fire.


fireTick

fireTick: "fireTick"

Remarks

Damage caused by burning over time.


fireworks

fireworks: "fireworks"

Remarks

Damage caused by fireworks.


flyIntoWall

flyIntoWall: "flyIntoWall"

Remarks

Damage caused by flying into a wall at high speed while gliding with Elytra.


freezing

freezing: "freezing"

Remarks

Damage caused by staying inside a Powder Snow block.


lava

lava: "lava"

Remarks

Damage caused by touching a Lava block.


lightning

lightning: "lightning"

Remarks

Damage caused by being struck by lightning.


magic

magic: "magic"

Remarks

Damage caused by magical attacks. For example, Evoker Fang or Conduit Block.


magma

magma: "magma"

Remarks

Damage caused by touching a Magma block.


none

none: "none"

Remarks

Damage caused by no source. For example, from a command or script.


override

override: "override"

Remarks

Damage caused by an indirect source. For example, setting a mob's health to 0 in a behavior pack.


piston

piston: "piston"

Remarks

Damage caused by a Piston.


projectile

projectile: "projectile"

Remarks

Damage caused by a projectile.


ramAttack

ramAttack: "ramAttack"


selfDestruct

selfDestruct: "selfDestruct"


sonicBoom

sonicBoom: "sonicBoom"


soulCampfire

soulCampfire: "soulCampfire"


stalactite

stalactite: "stalactite"

Remarks

Damage caused by a falling Stalactite block.


stalagmite

stalagmite: "stalagmite"

Remarks

Damage caused by touching a Stalagmite block.


starve

starve: "starve"

Remarks

Damage caused over time by having an empty hunger bar.


suffocation

suffocation: "suffocation"

Remarks

Damage caused by an Entity being out of air and inside a non-liquid block.


suicide

suicide: "suicide"

Remarks

Damage caused by an Entity killing itself. For example, from the /kill command.


temperature

temperature: "temperature"

Remarks

Damage caused by an Entity being in an inhabitable climate. For example, a Snow Golem in a biome with a temperature greater than 1.


thorns

thorns: "thorns"

Remarks

Damage caused by the Thorns armor enchantment and by the Guardian thorns effect.


void

void: "void"

Remarks

Damage caused over time by falling into the void.


wither

wither: "wither"

Remarks

Damage caused by the Wither effect. For example, from touching a Wither Rose.