Interface ThreadProvider<T>

Functional Interface:
This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.

@FunctionalInterface @Experimental public interface ThreadProvider<T>
  • Nested Class Summary

    Nested Classes
    Modifier and Type
    Interface
    Description
    static enum 
    Defines how often chunks thread should be refreshed.
  • Method Summary

    Modifier and Type
    Method
    Description
    static <T> @NotNull ThreadProvider<T>
     
    int
    findThread(T partition)
    Performs a server tick for all chunks based on their linked thread.
    Defines how often chunks thread should be updated.
  • Method Details

    • counter

      @NotNull static <T> @NotNull ThreadProvider<T> counter()
    • findThread

      int findThread(@NotNull T partition)
      Performs a server tick for all chunks based on their linked thread.
      Parameters:
      partition - the partition
    • refreshType

      @NotNull default @NotNull ThreadProvider.RefreshType refreshType()
      Defines how often chunks thread should be updated.
      Returns:
      the refresh type