Overview
minecraft:timer is an entity component: it goes in the components object of a custom mob, or in one of its component groups. Starts a countdown and runs an event when it reaches zero. Great for delays, like a fuse or a mob that changes after a while.
Fields
| Field | Type | Default | Description |
|---|---|---|---|
looping | Boolean | "true" | If true, the timer starts over each time it finishes. |
randomInterval | Boolean | "true" | If true, the time is picked randomly between the two values in time. |
random_time_choices | List | "[ ]" | Possible times in seconds, each with an optional weight; don't use it together with time. |
time | Range [a, b] | "[0.0, 0.0]" | Countdown length in seconds, either one number or a min and max pair. |
time_down_event | String | none | Event to run when the timer reaches zero. |
Example
Inside the components object of BP/entities/<name>.json (values are the defaults or placeholders):
BP/entities/<name>.json
{
"minecraft:timer": {
"looping": "true",
"randomInterval": "true",
"random_time_choices": "[ ]",
"time": "[0.0, 0.0]",
"time_down_event": ""
}
}