Timeout / World Clock Math Condition Procedure.

Issue description

Timeout Delay

In the future update could we have a timeout delay procedure for math condition. What it would do is have a count down timer based on game ticks before it can proceed to run the event in say an if statement. This could delay procedures for a time without needing to use a randomizer that is not a guarantee that it will be on time before the procedure will run the next time. You could use this with potion effects to deal damage to an item or armor for the same exact time as the time it takes for the potion to just about run out.

 

Real / Minecraft World Clock Delay.

The other one is a World clock delay. The same idea but rather than setting a tick for a delay to have it based on Minecraft world time. It may also be good to have a real world clock delay too. You could use this to run a procedure every night at say 6 pm in Minecraft if the block is placed in the world. This could be from everything to change the weather to raining too, strike lightning at the block which could be used to make zombie pigman and so on.

 

Why Randomizers Don't work great for delays.

Randomizers are hard to control the delay and can be hard to predict if the random chance will be on time for say a potion effect to be readded before it runs out due to it being random. Using a delay rather than a randomizer would fix this issue. It currently is not possible delay things for every night or specific time which restricts things when setting up more advanced mods like the lightning idea I just mentioned under World Clock Delay. This would open more doors for mods that require advanced procedure with delays.

Issue comments

Most of these can be done using tick events and variables.

For the player: use NBT entity tags to store counter value per player and increment the counter each tick event on players tick, which is a global trigger.

For items and blocks, you can use block variables and item variables (coming in 1.9.0) to count the value

After you reach a certain value, do something and reset the counter. Tick events happen each tick or at a given rate of ticks for blocks.

For the real world clock delay, I will add a procedure get the current time that will return time as a number so you will be able to check for the current time.

For world global timers, you can use global variables to achieve this, but there is no true global tick event yet in MCreator, but we will try to find a way to add this too.

yeah man nice!

btw im trying to make a very simple procedure here, to make my alarm clock ring in-game at the morning (set time 0 ingame)

the procedure is linked to a block on Tick Update:  But it wont work, nothing happens, whats im missing here? Thanks!

a