Started by
Sir_BananaCat
on
Topic category: Help with modding (Java Edition)
I want to have an entity repeatedly do something every 10 ticks, but the thing I can find is to run the procedure every tick the entity is alive. I can't find a way to do it, but maybe I haven't looked hard enough.
Edited by Sir_BananaCat on Wed, 06/14/2023 - 03:07
There is a block at the bottom of Flow Control tab that waits a certain amount of ticks
That still runs the procedure 20 times a second, but the procedure just waits for the number of ticks and then does it. For example, if I put the wait to 20 ticks (one second) it would run the procedure after one second, and it would run that one-second wait, 19 more times in that second.
Create a new effect (without showing particles)
If we load the code "If the target is not in the effect state, the effect will be applied for 10 ticks" every tick,
"if==true" every 10 ticks.
You can put the code you want to execute after the effect code.
I am not good at English, so this may be difficult to understand.
That worked! Thank you very much!