Posted June 28, 20169 yr I am new to forge modding and whenever I try thread.sleep or some other form of it, it freezes the game instead of pausing the script. Does anyone know a way for this?
June 28, 20169 yr http://mcforge.readthedocs.io/en/latest/concepts/sides/ There are 2 threads (+2 network). You can't use sleep, it would put to sleep whole thread. You need to make tick based counter - 20 ticks = 1sec. To do that use TickEvent (@SubscribeEvent) - You want one of those subevents. Remember to honour event.phase! More about forge events can be found in google. Any questions - ask P.S: It strongly depends "delay to what?" Very important so write what you want. 1.7.10 is no longer supported by forge, you are on your own.
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.