minecraft:queued_ticking for you with a switch.Get GodCraftOverview
minecraft:queued_ticking is a block component: it goes in the components object of a custom block. Runs an event after a delay, either once or again and again. The delay is picked at random from a range of ticks (20 ticks is one second).
Fields
| Field | Type | Default | Description |
|---|---|---|---|
interval_range | Array | none | Shortest and longest wait in ticks, for example [20, 40] for 1 to 2 seconds. |
looping | Boolean | "true" | When true, the event keeps repeating; when false, it runs only once. |
on_tick | Trigger | none | The event to run, with an optional condition and target. |
Example
Inside the components object of BP/blocks/<name>.json (values are the defaults or placeholders):
BP/blocks/<name>.json
{
"minecraft:queued_ticking": {
"interval_range": {},
"looping": "true",
"on_tick": {}
}
}