#How can I make a function that executes code over a period of time (ticks)

2 messages · Page 1 of 1 (latest)

tardy tartan
#

For example I want to run a particle animation, how can I run certain parts of the animation over a period of time?


        for(int i = 0; i < 10; i++) {
            context.getWorld().addParticle(ParticleTypes.HAPPY_VILLAGER, positionClicked.getX() + 0.5, positionClicked.getY() + 1 + i, positionClicked.getZ() + 0.5, 0, 0, 0);
            wait();
        }

    }```
visual flame
#

!!timer