Enum EnvType

java.lang.Object
java.lang.Enum<EnvType>
net.fabricmc.api.EnvType
All Implemented Interfaces:
Serializable, Comparable<EnvType>, java.lang.constant.Constable

public enum EnvType extends Enum<EnvType>
Represents a type of environment.

A type of environment is a jar file in a Minecraft version's json file's download subsection, including the client.jar and the server.jar.

See Also:
  • Enum Constant Details

    • CLIENT

      public static final EnvType CLIENT
      Represents the client environment type, in which the client.jar for a Minecraft version is the main game jar.

      A client environment type has all client logic (client rendering and integrated server logic), the data generator logic, and dedicated server logic. It encompasses everything that is available on the server environment type.

    • SERVER

      public static final EnvType SERVER
      Represents the server environment type, in which the server.jar for a Minecraft version is the main game jar.

      A server environment type has the dedicated server logic and data generator logic, which are all included in the client environment type. However, the server environment type has its libraries embedded compared to the client.

  • Method Details

    • values

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

      public static EnvType valueOf(String name)
      Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (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 type has no constant with the specified name
      NullPointerException - if the argument is null