Trying to make "java.util.Timer" Plugin for MCreator Software, but how?

Started by AtomiX7_NG34 on Sun, 10/11/2020 - 19:27

Topic category: Help with MCreator software

Last seen on 22:03, 7. Nov 2020
Joined Oct 2019
User points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • Tracker tickets:
  • MCreator plugins:
  • Comments:
Trying to make "java.util.Timer" Plugin for MCreator Software, but how?
Sun, 10/11/2020 - 19:27

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.

Last seen on 10:02, 26. Nov 2020
Joined Apr 2010
User points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • Tracker tickets:
  • MCreator plugins:
  • Comments:
Minecraft is single-threaded…
Mon, 10/12/2020 - 12:57

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.