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, afabric.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.
-
-
Constructor Summary
Constructors Constructor Description QuiltPackScanner(QuiltScanner quiltScanner, FabricScanner fabricScanner)
-
Method Summary
Modifier and Type Method Description List<ScannedMod>scan(Collection<File> jarFiles)Read every jar in jarFiles and report what each declared. -
-
Constructor Detail
-
QuiltPackScanner
QuiltPackScanner(QuiltScanner quiltScanner, FabricScanner fabricScanner)
- Parameters:
quiltScanner- Readsquilt.mod.json.fabricScanner- Readsfabric.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.
-
-
-
-