Damage Source

Data Type

An Object used to specify how to deal damage to an entity.

Danger

The concept of damage sources is deprecated. Associated fields may be removed in a future version. Any power or action requiring you to specify a damage source, will now have a way to specify a damage type instead (usually a field called damage_type) which should be used instead. More information here.

Fields

Field Type Default Description
name String The name of the damage source. Controls death message as well as other interactions. Consider the List of Damage Source Names when picking a name.
bypasses_armor Boolean false When true, armor values are not taken into account when calculating the actual damage amount taken.
fire Boolean false When true, the damage will be considered fire damage.
unblockable Boolean false When true, the damage will be unblockable (not reduced by resistance effects or protection enchantments).
magic Boolean false When true, the damage will be considered magic damage.
out_of_world Boolean false When true, the damage will be considered "out of world" damage, i.e. damage from falling into the void.

Examples

"source": {
    "name": "starve",
    "bypasses_armor": true,
    "unblockable": true
}

A damage source which specifies damage similar to the one caused by starvation.