Class TickThread

All Implemented Interfaces:
Runnable

@Internal public 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)
    • TickThread

      public TickThread(String name)
  • Method Details

    • run

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

      protected void tick()
    • lock

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

      public long getTick()