Enum Class DependencyType

java.lang.Object
java.lang.Enum<DependencyType>
io.github.smootheez.modrinth.DependencyType
All Implemented Interfaces:
Serializable, Comparable<DependencyType>, Constable

public enum DependencyType extends Enum<DependencyType>
Represents the type of dependency relationship used when publishing metadata to mod distribution platforms such as Modrinth or CurseForge.

Each enum value corresponds to a specific semantic meaning describing how the current project interacts with another referenced project. The values are serialized using Gson via the SerializedName annotations to match the expected JSON schema.

  • Enum Constant Details

    • REQUIRED

      @SerializedName("required") public static final DependencyType REQUIRED
      Indicates that the dependency is mandatory. The mod cannot load or function correctly without this project. Serialized as "required".
    • OPTIONAL

      @SerializedName("optional") public static final DependencyType OPTIONAL
      Indicates that the dependency is optional. The mod can run without it, but may enable extra features if present. Serialized as "optional".
    • INCOMPATIBLE

      @SerializedName("incompatible") public static final DependencyType INCOMPATIBLE
      Marks a dependency as incompatible. If the referenced project is installed, the mod should not load. Serialized as "incompatible".
    • EMBEDDED

      @SerializedName("embedded") public static final DependencyType EMBEDDED
      Indicates that the dependency is bundled or embedded directly inside the mod’s own files, meaning users do not need to install it separately. Serialized as "embedded".
  • Method Details

    • values

      public static DependencyType[] 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 DependencyType 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