Enum ModDependency.Kind

java.lang.Object
java.lang.Enum<ModDependency.Kind>
net.fabricmc.loader.api.metadata.ModDependency.Kind
All Implemented Interfaces:
Serializable, Comparable<ModDependency.Kind>, java.lang.constant.Constable
Enclosing interface:
ModDependency

public static enum ModDependency.Kind extends Enum<ModDependency.Kind>
  • Enum Constant Details

  • Method Details

    • values

      public static ModDependency.Kind[] 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 ModDependency.Kind 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
    • getKey

      public String getKey()
      Get the key for the dependency as used by fabric.mod.json (v1+) and dependency overrides.
    • isPositive

      public boolean isPositive()
      Get whether the dependency is positive, encouraging the inclusion of a mod instead of negative/discouraging.
    • isSoft

      public boolean isSoft()
      Get whether it is a soft dependency, allowing the mod to still load if the dependency is unmet.
    • parse

      public static ModDependency.Kind parse(String key)
      Parse a dependency kind from its key as provided by getKey().