Enum Class ConnectionType

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

public enum ConnectionType extends Enum<ConnectionType>
Declares categories of connections based on the other side.
  • Enum Constant Details

    • NEOFORGE

      public static final ConnectionType NEOFORGE
      Indicates that the other end is Neo. Modded channels will be negotiated via ModdedNetworkPayload.
    • OTHER

      public static final ConnectionType OTHER
      Indicates that the other end of the connection is not Neo. This may be a Vanilla connection, or another modded platform (such as Fabric or Bukkit). Modded channels will be negotiated via MinecraftRegisterPayload.
  • Constructor Details

    • ConnectionType

      private ConnectionType()
  • Method Details

    • values

      public static ConnectionType[] 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 ConnectionType 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
    • isOther

      public boolean isOther()
    • isNeoForge

      public boolean isNeoForge()