#Change a state using a timer
1 messages · Page 1 of 1 (latest)
You need to use custom components, then use onPlayerInteract and onTick event.
Thanks
How do you make the timer?
Here's how it work.
Let's have a 2 different states for block. In state1 add a custom component that has onPlayerInteract event, when click, set the state of block to state2.
The state2 has minecraft:tick component and set interval_range to how long the timer you like. And of course you need to use onTick event which will set the state to state1.
So when you click it, the block state will switch to state2, then when on state2 after some time, it will set back to state1.
Ok I'll try