Interface Mod

All Known Implementing Classes:
AssetPack, PendingLoadJavaPlugin, PendingLoadPlugin

public interface Mod
  • Method Details

    • getManifest

      PluginManifest getManifest()
    • isCoreMod

      default boolean isCoreMod()
    • calculateLoadOrder

      @Nonnull static <T extends Mod> List<T> calculateLoadOrder(@Nonnull Map<PluginIdentifier, T> pending) throws ModLoadOrderException
      Takes the pending plugins and creates a list in load order. Throws if required dependencies are missing or if a cyclic dependency is detected.
      Throws:
      ModLoadOrderException
    • calculateLoadOrder

      @Nonnull static <T extends Mod> List<T> calculateLoadOrder(@Nonnull Map<PluginIdentifier, T> pending, @Nonnull BiPredicate<PluginIdentifier, SemverRange> externalDepsValidator) throws ModLoadOrderException
      Takes the pending plugins and creates a list in load order. Throws if required dependencies are missing or if a cyclic dependency is detected. The externalDepsValidator checks whether a dependency not found in pending is satisfied externally (e.g., a pack depending on a plugin or vice versa). It receives both the identifier and the required version range so cross-type version constraints can be validated.
      Throws:
      ModLoadOrderException
    • calculateLoadOrder

      @Nonnull static <T extends Mod> List<T> calculateLoadOrder(@Nonnull Map<PluginIdentifier, T> pending, @Nonnull BiPredicate<PluginIdentifier, SemverRange> externalDepsValidator, @Nonnull List<PluginIdentifier> manualOrder) throws ModLoadOrderException
      Takes the pending plugins and creates a list in load order. The manualOrder list specifies an explicit relative ordering for specific mods — consecutive pairs become load-after edges. Throws if the manual ordering conflicts with dependency constraints, if required dependencies are missing, or if a cyclic dependency is detected.
      Throws:
      ModLoadOrderException