Enum Class HandlerThread

java.lang.Object
java.lang.Enum<HandlerThread>
net.neoforged.neoforge.network.registration.HandlerThread
All Implemented Interfaces:
Serializable, Comparable<HandlerThread>, Constable

public enum HandlerThread extends Enum<HandlerThread>
Used by PayloadRegistrar to declare the default handling thread for registered IPayloadHandlers.
  • Enum Constant Details

    • MAIN

      public static final HandlerThread MAIN
      The main thread of the receiving side.

      On the logical client, this is the Render Thread.

      On the logical server, this is the Server Thread.

    • NETWORK

      public static final HandlerThread NETWORK
      The network thread, which executes concurrently to the main thread.
  • Constructor Details

    • HandlerThread

      private HandlerThread()
  • Method Details

    • values

      public static HandlerThread[] values()
      Returns an array containing the constants of this enum class, in the order they are declared.
      Returns:
      an array containing the constants of this enum class, in the order they are declared
    • valueOf

      public static HandlerThread valueOf(String name)
      Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (Extraneous whitespace characters are not permitted.)
      Parameters:
      name - the name of the enum constant to be returned.
      Returns:
      the enum constant with the specified name
      Throws:
      IllegalArgumentException - if this enum class has no constant with the specified name
      NullPointerException - if the argument is null