minecraft:damage_over_time for you with a switch.Get GodCraftOverview
minecraft:damage_over_time is an entity component: it goes in the components object of a custom mob, or in one of its component groups. Hurts the entity by a set amount again and again on a timer.
Fields
| Field | Type | Default | Description |
|---|---|---|---|
damage_per_hurt | integer | 1 | Damage dealt each time. |
time_between_hurt | number | 0 | Seconds between each hit of damage. |
Example
Inside the components object of BP/entities/<name>.json (values are the defaults or placeholders):
BP/entities/<name>.json
{
"minecraft:damage_over_time": {
"damage_per_hurt": 1,
"time_between_hurt": 0
}
}