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()
      final Regex getDependencyExclusions()
      final Utilities getUtilities()
      String readMinecraftConstraint(JsonNode modConfig) The quilt_loader.depends entry for minecraft, in either declaration form, or null.
      List<ModDependency> readDependencies(JsonNode modConfig, String modId) The non-platform mods this descriptor names as dependencies.
      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

        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

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

        The non-platform mods this descriptor names as dependencies.

        Abstract because the two formats disagree on the shape of the block, not merely its path. A descriptor declaring none must yield an empty list rather than throwing.

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