Enum Class IncompatibleModReason

java.lang.Object
java.lang.Enum<IncompatibleModReason>
net.neoforged.fml.loading.moddiscovery.IncompatibleModReason
All Implemented Interfaces:
Serializable, Comparable<IncompatibleModReason>, Constable

public enum IncompatibleModReason extends Enum<IncompatibleModReason>
When we find a jar file that no IModFileReader can handle, we try to detect if the mod potentially came from another modding system and warn the user about it not being compatible.
  • Enum Constant Details

  • Field Details

    • ident

      private final Predicate<cpw.mods.jarhandling.JarContents> ident
  • Constructor Details

    • IncompatibleModReason

      private IncompatibleModReason(Predicate<cpw.mods.jarhandling.JarContents> identifier)
  • Method Details

    • values

      public static IncompatibleModReason[] 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 IncompatibleModReason 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
    • getReason

      public String getReason()
    • detect

      public static Optional<IncompatibleModReason> detect(cpw.mods.jarhandling.JarContents jar)
    • filePresent

      private static Predicate<cpw.mods.jarhandling.JarContents> filePresent(String filename)