Damage Source
An Object used to specify how to deal damage to an entity.
Danger
This data type has been deprecated since Minecraft 1.19.4 in favor of using damage types and damage type tags. Associated fields may be removed in a future version. See here for a more detailed information
See Minecraft Wiki: Damage type and Minecraft Wiki: Damage type tag (Java Edition) for more information about vanilla damage types and damage type tags.
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.