Class TickScheduler

java.lang.Object
top.girlkisser.lazuli.api.misc.TickScheduler

public class TickScheduler extends Object
Allows you to schedule one-shot events that occur in some amount of ticks.
Generally you should not need to make a custom one, using either SERVER or CLIENT should be sufficient.
  • Field Details

    • SERVER

      public static final TickScheduler SERVER
      A tick scheduler for the server.
    • CLIENT

      public static final TickScheduler CLIENT
      A tick scheduler for the client.
  • Constructor Details

    • TickScheduler

      public TickScheduler()
      Allows you to schedule one-shot events that occur in some amount of ticks.
      Generally you should not need to make a custom one, using either SERVER or CLIENT should be sufficient.
  • Method Details

    • tick

      @Internal public void tick()
      Ticks the scheduler. The SERVER and CLIENT schedulers are ticked automatically by Lazuli.
    • scheduleWork

      public void scheduleWork(int inTicks, Runnable runnable)
      Schedule a task to run in inTicks ticks.
      Parameters:
      inTicks - The amount of ticks to wait until execution.
      runnable - The task to execute.