Topic category: Help with MCreator software
I'm working on updating my Betting Machine mod, and I'm trying to add a short delay to simulate the machine rolling.
On right click, I set a number NBT tag called "rollTime" to the value of 4.
Then, in UpdateTick, it detects that rollTime has changed, and every second, removes one from rollTIme, effectively becoming a 4 second timer.
The issue comes back up when in onRightClick, I attempt to have it detect that rollTime is back at 0, and calculate the prize winnings.
it doesn't do that, the procedure already finished, it set rollTime to 4, then didnt detect it at 0, and finished running.
I am completely and utterly confused on how I would get onRightClick to pick back up when UpdateTick finishes resetting rollTime.
I tried re-calling onRightClick at the end of UpdateTick, but I get compile errors.
Here's my current code : https://imgur.com/a/MdorQen
Please help!
Try changing the ≠ to <. It might be that it somehow get negative.