Started by
AtomiX7_NG34
on
Topic category: Help with MCreator software
So, I already did the Code Block "Wait [%1]" for Blockly Editor, but it needs to automatically make imports for "java.util.Timer" & "java.util.TimerTask".
But I can't figure out how...
Is there any help for me?
Bedises, I will upload my Plugin on this page, for y'all, because everyone wanted a Timer in MCreator. (Maybe)
-- I'll try to figure it out by myself.
Edited by AtomiX7_NG34 on Tue, 03/16/2021 - 12:01
Minecraft is single-threaded in logic. Tasks run in parallel so delay can only be virtual with counting ticks and doing something after that many ticks elapse.
So you need to store counter value. There are multiple types of data storage such as NBT and variables.
Then you need tick procedure to tick delay.
I don't see a way how one could make universal wait procedure block aware of all this and so the block would "decide", what variable type to use and which tick trigger to use.
The procedure is not aware of itself for what it will be used.
Also check https://mcreator.net/tracker/issue/43569
Solved!
I've got an idea!