Skip to content

Type

Damage Condition Type

Checks whether the damage source is of a certain damage type.

Type ID: eggolib:type

Fields

Field Type Default Description
damage_type Identifier The identifier of the damage type to compare the damage source to.

Examples

"damage_condition": {
    "type": "eggolib:type",
    "damage_type": "minecraft:lightning_bolt"
}

This example will check if the damage source is of the minecraft:lightning_bolt damage type.

"damage_condition": {
    "type": "eggolib:type",
    "damage_type": "eggolib:change_health_underflow"
}

This example will check if the damage source is of the eggolib:change_health_underflow damage type, which is dealt by the Change Health (Entity Action Type) and the Modify Health (Entity Action Type) if the new health value is < 0.