Class FabricScanner
-
- All Implemented Interfaces:
-
de.griefed.serverpackcreator.api.modscanning.ModJarScanner
public final class FabricScanner extends FabricFamilyScanner
fabric.mod.json-based scanning of Fabric-Minecraft mods.If
environmentspecifiesclient, 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 Quilt shares; only Fabric'sdepends-block shape is specific to this scanner.Griefed
-
-
Field Summary
Fields Modifier and Type Field Description private final StringscanAnnouncementprivate final Utilitiesutilities
-
Constructor Summary
Constructors Constructor Description FabricScanner(ObjectMapper objectMapper, Utilities utilities)
-
Method Summary
Modifier and Type Method Description StringgetScanAnnouncement()final UtilitiesgetUtilities()StringreadMinecraftConstraint(JsonNode modConfig)The depends.minecraftrange this descriptor states, ornull.List<ModDependency>readDependencies(JsonNode modConfig, String modId)The non-platform mods this descriptor names as dependencies. List<String>readProvides(JsonNode modConfig, String modId)Fabric declares providesas a flat array of ids the mod also answers to.-
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
-
FabricScanner
FabricScanner(ObjectMapper objectMapper, Utilities utilities)
- Parameters:
objectMapper- For JSON-parsing.utilities- Common utilities used across ServerPackCreator.
-
-
Method Detail
-
getScanAnnouncement
String getScanAnnouncement()
-
getUtilities
final Utilities getUtilities()
-
readMinecraftConstraint
String readMinecraftConstraint(JsonNode modConfig)
The
depends.minecraftrange this descriptor states, ornull. Read separately from readDependencies becauseminecraftis deliberately excluded there as the platform — the value is still what says which Minecraft the jar was built against.
-
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)
Fabric declares
providesas a flat array of ids the mod also answers to. Fabric API 0.92.11+1.20.1 uses it to answer to the historicalfabricwhile calling itselffabric-api; the newest builds have dropped the block, so its absence is normal and yields an empty list.
-
-
-
-