Class FabricScanner

    • Nested Class Summary

      Nested Classes 
      Modifier and Type Class Description
    • Field Summary

      Fields 
      Modifier and Type Field Description
    • Constructor Summary

      Constructors 
      Constructor Description
      FabricScanner(ObjectMapper objectMapper, Utilities utilities)
    • Enum Constant Summary

      Enum Constants 
      Enum Constant Description
    • Constructor Detail

      • FabricScanner

        FabricScanner(ObjectMapper objectMapper, Utilities utilities)
        Parameters:
        objectMapper - For JSON-parsing.
        utilities - Common utilities used across ServerPackCreator.
    • Method Detail

      • scan

         Pair<Collection<File>, Collection<Pair<String, String>>> scan(Collection<File> jarFiles)

        Scan the fabric.mod.json-files in mod JAR-files of a given directory for their sideness.

        If environment specifies client, and is not listed as a dependency for another mod, it is added and therefore later on excluded from the server pack.

        Parameters:
        jarFiles - A list of files in which to check the fabric.mod.json-files.
        Returns:

        List of mods not to include in server pack based on fabric.mod.json-content.

      • getModsDelta

         TreeSet<File> getModsDelta(Collection<File> filesInModsDir, TreeSet<String> clientMods)

        Get a list of mod-jars which can safely be excluded from the server pack.

        Returns:

        A set of all files from the passed collection which can safely be excluded from the server pack.