Entity Documentation - minecraft:timer
minecraft:timer
adds a timer after which an event will initiate.
Parameters
Name | Default Value | Type | Description |
---|---|---|---|
looping | True | Boolean | If true, the timer will restart every time after it initiates. |
randomInterval | True | Boolean | If true, the amount of time on the timer will be random between the min and max values specified in time. |
random_time_choices | [ ] | List | A list of objects, representing one value in seconds that can be picked before initiating the event and an optional weight. Incompatible with time. |
time | [0.0, 0.0] | Range [a, b] | Amount of time in seconds for the timer. Can be specified as a number or a pair of numbers (min and max). Incompatible with random_time_choices. |
time_down_event | not set | JSON Object | Contains any events to initiate when the time on the timer runs out. |
Example
"minecraft:timer":{
"looping": true,
"randomInterval":true,
"time": [0.0, 0.0],
"time_down_event": {
"event":"minecraft:times_up"
}
}
Vanilla entities examples
husk
"minecraft:timer": {
"looping": false,
"time": 30,
"time_down_event": {
"event": "minecraft:convert_to_zombie"
}
}
Vanilla entities using minecraft:timer
Feedback
https://aka.ms/ContentUserFeedback.
Coming soon: Throughout 2024 we will be phasing out GitHub Issues as the feedback mechanism for content and replacing it with a new feedback system. For more information see:Submit and view feedback for