Damage Source

Data Type.

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

Fields:

Field Type Default Description
name String The name of the damage source. Controls death message as well as other interactions. Consider vanilla damage sources 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.

Example:

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

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