Class QuiltScanner

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

    
    public final class QuiltScanner
    extends FabricFamilyScanner
                        

    quilt.mod.json-based scanning of Quilt-Minecraft mods.

    If minecraft.environment specifies client, and the mod is not listed as a dependency of another mod, it is later excluded from the server pack. Sideness and id reading live in FabricFamilyScanner, which Fabric shares; only Quilt's depends-block shape is specific to this scanner.

    Author:

    Griefed

    • Nested Class Summary

      Nested Classes 
      Modifier and Type Class Description
    • Constructor Summary

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

      Enum Constants 
      Enum Constant Description
    • Method Summary

      Modifier and Type Method Description
      String getScanAnnouncement() Logged once before a scan starts, or null to announce nothing.
      final Regex getDependencyExclusions() Dependency ids that are the platform rather than a mod, so they never pull a jar into the keep-list.
      String readMinecraftConstraint(JsonNode modConfig) The quilt_loader.depends entry for minecraft, in either declaration form, or null.
      List<ModDependency> readDependencies(JsonNode modConfig, String modId) Quilt declares quilt_loader.depends as an array whose entries are either an object carrying an id, or the bare id as a string — both forms occur in the wild, so both are read.
      List<String> readProvides(JsonNode modConfig, String modId) Quilt nests provides under quilt_loader, with the same entry shape as depends: either an object carrying an id, or the bare id as a string.
      • Methods inherited from class de.griefed.serverpackcreator.api.modscanning.FabricFamilyScanner

        getUtilities, read
      • Methods inherited from class de.griefed.serverpackcreator.api.modscanning.JsonDescriptorScanner

        getJarJson
      • Methods inherited from class de.griefed.serverpackcreator.api.modscanning.DescriptorScanner

        scan
      • Methods inherited from class java.lang.Object

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

      • QuiltScanner

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

      • getScanAnnouncement

         String getScanAnnouncement()

        Logged once before a scan starts, or null to announce nothing. Exists only because the per-loader wording is user-facing progress output.

      • getDependencyExclusions

         final Regex getDependencyExclusions()

        Dependency ids that are the platform rather than a mod, so they never pull a jar into the keep-list.

        Only quilt_loader is the platform. quilted_fabric_api is QFAPI — Quilt's port of Fabric API, a mod the server genuinely needs — and so is quilt_base, which was excluded here until 2026-09-01 as though it were the runtime. It is not: it is QSL's base module, shipped by QFAPI (library/core/qsl_base in QuiltMC/quilt-standard-libraries, whose quilt_base_testmod depends on ["quilt_loader", "quilt_base"]). Excluding it was the same mistake FabricScanner documents on its own list — that one excludes fabricloader but never fabric, because a dependency you refuse to record can neither be reported nor rescued back into a pack that disabled it.

      • readMinecraftConstraint

         String readMinecraftConstraint(JsonNode modConfig)

        The quilt_loader.depends entry for minecraft, in either declaration form, or null. Excluded from readDependencies as the platform, but it is still the jar's own statement of what it targets.

      • readDependencies

         List<ModDependency> readDependencies(JsonNode modConfig, String modId)

        Quilt declares quilt_loader.depends as an array whose entries are either an object carrying an id, or the bare id as a string — both forms occur in the wild, so both are read. A descriptor without the block declares no dependencies and yields an empty list.

      • readProvides

         List<String> readProvides(JsonNode modConfig, String modId)

        Quilt nests provides under quilt_loader, with the same entry shape as depends: either an object carrying an id, or the bare id as a string. Absent for most mods, which yields an empty list.