Topic category: Help with Minecraft modding (Java Edition)
If you don't want to make advanced modding and enter the code because you don't know java or any reason that you have, but you need a wait time block, yeah you read it well, Just 1 block to make a certain quantity of milliseconds to wait:
Make a Custom Code snippet and paste this code
"try { Thread.sleep(#); } catch(InterruptedException ex) { Thread.currentThread().interrupt(); }"
You just have to put the number of milliseconds inside Thread.sleep(#) replacing the # symbol
To use it simply put this block between the code you want to occur from the start and the one that will occur at the end of the wait time
It may cause a little bit of lag.
Forget it, it causes a LOT of lag I'm using 10000 milliseconds and it lags for 10 seconds and then it starts counting other 10 seconds xd
Minecraft uses a single threaded model so you need to make delay using counters, not by true delay/sleep function.
Check this tutorial for example on one approach to this: https://www.youtube.com/watch?v=VXAPH0g9A00&list=PLAeL-oIFIEngE6jRgFYeFMfuj8WQsO3Ei&index=26&t=2s