for last 3 hours i have been trying to find out how to execute a line of code multiple amount of times. Its going like this: typing something turns boolean to true and after activating it i want mod to repeat an action until stopped by changing boolean to false. I firstly tried while loop but it crashed the game so im guessing its not an option. Then i tried to do every 40ticks but i always get errors when trying to use phase.
My question is: how do i repeat the same thing every 2 seconds?
Note: its for forge mod 1.16.5
i tried using phase but that didnt work as i mentioned. I have no other ideas on how i can make it work
Please keep in mind that im very new to such things and its my first project.
siema 2 is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.