Skip to content
BasaltSoftware
Bedrock 1.26.60

Site colour

Discord
Esc

    ↑↓ moveEnter openEsc close

    Keyboard shortcuts
    Ctrl K
    Search the whole site, from any page
    /
    Jump to the sidebar search, or search the whole site where there isn't one
    Enter
    Open the top search result
    Esc
    Clear the search, or close this panel
    ?
    Show these shortcuts
    Entities

    EntityDamageCause

    The snake_case string a EntityDamageSource.cause carries.

    1 min read · 3 sections
    On this page

    Enum in @minecraft/server

    The snake_case string a EntityDamageSource.cause carries.

    import { EntityDamageCause } from '@minecraft/server';
    import { EntityDamageCause } from '@minecraft/server';
    const value: EntityDamageCause = EntityDamageCause.anvil;
    console.log(value); // "anvil"
    import { EntityDamageCause } from '@minecraft/server';
    const value = EntityDamageCause.anvil;
    console.log(value); // "anvil"
    Name Value Description
    anvil "anvil"
    blockExplosion "block_explosion"
    campfire "campfire"
    charging "charging"
    contact "contact"
    drowning "drowning"
    entityAttack "entity_attack"
    entityExplosion "entity_explosion"
    fall "fall"
    fallingBlock "falling_block"
    fire "fire"
    fireTick "fire_tick"
    fireworks "fireworks"
    flyIntoWall "fly_into_wall"
    freezing "freezing"
    lava "lava"
    lightning "lightning"
    magic "magic"
    magma "magma"
    none "none"
    override "override"
    piston "piston"
    projectile "projectile"
    ramAttack "ram_attack"
    selfDestruct "self_destruct"
    sonicBoom "sonic_boom"
    soulCampfire "soul_campfire"
    stalactite "stalactite"
    stalagmite "stalagmite"
    starve "starve"
    suffocation "suffocation"
    temperature "temperature"
    thorns "thorns"
    void "void"
    wither "wither"

    EntityDamageSource.cause, EntityApplyDamageOptions.cause, EntityHurtAfterEventOptions.allowedDamageCauses, EntityHurtBeforeEventOptions.allowedDamageCauses