-
Notifications
You must be signed in to change notification settings - Fork 21
Dependencies
With version 0.28 a dependency mechanism has been added to the modloader. Special entries in the modname.properties file control how the modloader loads and requires other mods.
A mod 'X' can require other mods. Those mods must be present and they are loaded before mod 'X'.
depend.requires=modname1, modname2
A mod 'X' can conflict with other mods. The modloader will refuse to load if conflicting mods are present.
depend.conflicts=modname1, modname2
The modloader can be instructed to load certain mods before or after mod 'A'.
depend.suggests=modbefore1,modbefore2
depend.precedes=modafter1,modafter2
There is no hard requirement for the other mods to be present. An unknown mod in 'depend.suggests' or 'depend.precedes' is silently ignored.
A mod can be loaded on demand, i.e. it must be referenced by any mod which is not flagged as 'on demand'
depend.ondemand=true
A mod can import another mods classes if both use their own class loader (i.e. sharedClassLoader=false; this is the default)
depend.import=modimport1,modimport2
The public classes and interfaces from the imported mod are then available for use in the importing mod.
A mod providing only a script or a serverpack should require 'scriptrunner' or 'serverpacks' as a dependency
depend.requires=scriptrunner
depend.requires=serverpacks
Assuming there is a 'httpserver' library mod which is used by the 'serverpacks' mod. The 'httpserver' mod should not be loaded if it is unused
depend.ondemand=true
The 'serverpacks' mod would import 'httpserver'
depend.import=httpserver