minecraft:hurt_on_condition for you with a switch.Get GodCraftOverview
minecraft:hurt_on_condition is an entity component: it goes in the components object of a custom mob, or in one of its component groups. Damages the entity when certain conditions are true, like standing in lava or touching water.
Fields
| Field | Type | Default | Description |
|---|---|---|---|
damage_conditions | Array | none | List of conditions, each with the damage type, amount and event to fire. |
Example
Inside the components object of BP/entities/<name>.json (values are the defaults or placeholders):
BP/entities/<name>.json
{
"minecraft:hurt_on_condition": {
"damage_conditions": {}
}
}