Class ModListCompiler
-
- All Implemented Interfaces:
public final class ModListCompilerCompiler of the list of mods to include in a server pack: walks the mods-directory, excludes user-specified and automatically discovered clientside-only mods, and honors the mod-whitelist. ServerPackHandler remains the facade through which consumers access these operations.
-
-
Field Summary
Fields Modifier and Type Field Description private final List<String>modFileEndings
-
Constructor Summary
Constructors Constructor Description ModListCompiler(ApiProperties apiProperties, ModScanner modScanner)
-
Method Summary
Modifier and Type Method Description final List<String>getModFileEndings()Extensions treated as mod files. final Pair<List<File>, List<File>>compileModList(PackConfig packConfig)Generates a list of all mods to include in the server pack. final Pair<List<File>, List<File>>compileModList(String modsDir, List<String> clientsideModsList, List<String> modWhitelist, String minecraftVersion, String modloader)Generates a list of all mods to include in the server pack. -
-
Constructor Detail
-
ModListCompiler
ModListCompiler(ApiProperties apiProperties, ModScanner modScanner)
-
-
Method Detail
-
getModFileEndings
final List<String> getModFileEndings()
Extensions treated as mod files.
disabledis included deliberately: a launcher marks a mod off by renaming it, and such a file must still be recognised so it can be excluded rather than copied blindly.The single source of truth: ServerPackHandler.modFileEndings reads this rather than holding its own copy, so the published constant and the list generation walks with cannot drift apart.
-
compileModList
final Pair<List<File>, List<File>> compileModList(PackConfig packConfig)
Generates a list of all mods to include in the server pack. If the user specified clientside-mods to exclude, and/or if the automatic exclusion of clientside-only mods is active, they will be excluded, too.
packConfig — The configurationModel containing the modpack directory, list of clientside-only mods to exclude, Minecraft version used by the modpack and server pack and the modloader used by the modpack and server pack.
-
compileModList
final Pair<List<File>, List<File>> compileModList(String modsDir, List<String> clientsideModsList, List<String> modWhitelist, String minecraftVersion, String modloader)
Generates a list of all mods to include in the server pack. If the user specified clientside-mods to exclude, and/or if the automatic exclusion of clientside-only mods is active, they will be excluded, too.
-
-
-
-