Contents
Interface Mod
- All Known Implementing Classes:
AssetPack, PendingLoadJavaPlugin, PendingLoadPlugin
public interface Mod
-
Nested Class Summary
Nested Classes -
Method Summary
Modifier and TypeMethodDescriptioncalculateLoadOrder(Map<PluginIdentifier, T> pending) Takes the pending plugins and creates a list in load order.calculateLoadOrder(Map<PluginIdentifier, T> pending, BiPredicate<PluginIdentifier, SemverRange> externalDepsValidator) Takes the pending plugins and creates a list in load order.calculateLoadOrder(Map<PluginIdentifier, T> pending, BiPredicate<PluginIdentifier, SemverRange> externalDepsValidator, List<PluginIdentifier> manualOrder) Takes the pending plugins and creates a list in load order.default boolean
-
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. TheexternalDepsValidatorchecks whether a dependency not found inpendingis 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. ThemanualOrderlist 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
-