minecraft:drying_out_timer for you with a switch.Get GodCraftOverview
minecraft:drying_out_timer is an entity component: it goes in the components object of a custom mob, or in one of its component groups. Counts down while the entity is out of water and fires an event when it is fully dried out. Getting wet in water or rain stops the timer.
Fields
| Field | Type | Default | Description |
|---|---|---|---|
dried_out_event | String | none | Event fired when the timer reaches zero. |
recover_after_dried_out_event | String | none | Event fired when a dried out entity gets water again. |
stopped_drying_out_event | String | none | Event fired when the entity gets wet and stops drying. |
total_time | Decimal | "0.0" | Seconds until the entity is fully dried out. |
water_bottle_refill_time | Decimal | "0.0" | Extra seconds added when a splash water bottle hits the entity. |
Example
Inside the components object of BP/entities/<name>.json (values are the defaults or placeholders):
BP/entities/<name>.json
{
"minecraft:drying_out_timer": {
"dried_out_event": "",
"recover_after_dried_out_event": "",
"stopped_drying_out_event": "",
"total_time": "0.0",
"water_bottle_refill_time": "0.0"
}
}