Class QuiltPackScanner

  • All Implemented Interfaces:
    de.griefed.serverpackcreator.api.modscanning.ModJarScanner

    
    public final class QuiltPackScanner
     implements ModJarScanner
                        

    The scanner for a Quilt pack, which is not one descriptor format but two: Quilt runs Fabric mods, so a jar in a Quilt pack may carry a quilt.mod.json, a fabric.mod.json, or both.

    The directory is therefore scanned twice and the two verdicts merged per jar, with CLIENT winning. That asymmetry is deliberate: a scan that could not read a jar falls back to SERVER, so a SERVER verdict is only meaningful when it came from a descriptor the scanner actually read, while a CLIENT verdict can only come from a descriptor that said so.

    The Quilt entry is the one kept whenever the two agree, so a mod carrying both descriptors is reported with the id and dependencies Quilt declares.

    • Nested Class Summary

      Nested Classes 
      Modifier and Type Class Description
    • Field Summary

      Fields 
      Modifier and Type Field Description
    • Enum Constant Summary

      Enum Constants 
      Enum Constant Description
    • Method Summary

      Modifier and Type Method Description
      List<ScannedMod> scan(Collection<File> jarFiles) Read every jar in jarFiles and report what each declared.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • QuiltPackScanner

        QuiltPackScanner(QuiltScanner quiltScanner, FabricScanner fabricScanner)
        Parameters:
        quiltScanner - Reads quilt.mod.json.
        fabricScanner - Reads fabric.mod.json.
    • Method Detail

      • scan

         List<ScannedMod> scan(Collection<File> jarFiles)

        Read every jar in jarFiles and report what each declared.

        Returns:

        One entry per input jar, in input order — never fewer, whatever a jar contained.