Class TickThread

All Implemented Interfaces:
Runnable

@Internal public final class TickThread extends MinestomThread
Thread responsible for ticking chunks and entities.

Created in ThreadDispatcher, and awaken every tick with a task to execute.

  • Constructor Details

    • TickThread

      public TickThread(int number)
  • Method Details

    • current

      @Nullable public static @Nullable TickThread current()
    • run

      public void run()
      Specified by:
      run in interface Runnable
      Overrides:
      run in class Thread
    • entries

    • lock

      @NotNull public @NotNull ReentrantLock lock()
      Gets the lock used to ensure the safety of entity acquisition.
      Returns:
      the thread lock
    • getTick

      public long getTick()