Class ModListCompiler

  • All Implemented Interfaces:

    
    public final class ModListCompiler
    
                        

    Compiler 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. Extracted from ServerPackHandler (refactor Phase 1d); ServerPackHandler remains the facade through which consumers access these operations.

    • Method Detail

      • 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.

        Parameters:
        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.
        Returns:

        A list of all mods to include in the 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.

        Parameters:
        modsDir - The mods-directory of the modpack of which to generate a list of all its contents.
        clientsideModsList - A list of all clientside-only mods.
        modWhitelist - A list of mods to include regardless if a match was found in clientsideModsList.
        minecraftVersion - The Minecraft version the modpack uses.
        modloader - The modloader the modpack uses.
        Returns:

        A list of all mods to include in the server pack.