Package de.griefed.serverpackcreator.api.config
Step 1 & 2: describing a server pack and proving the description is valid.
PackConfig is the central data object; everything else here either helps build it (parsing a modpack's manifest) or checks it before generation.
PackConfig— the recipe for one server pack: modpack directory, modloader + version, Minecraft version, which directories/mods to include or exclude, and the generation flags. The single object you hand to the checker and then to the generator.ConfigurationHandler— the validator-in-chief.checkConfiguration()(and its variants) runs every check and reports the errors back so a GUI/CLI/website can show them. It delegates to the focused validators below.InclusionsValidator/ModloaderValidator/ModpackDirectoryValidator— one validator per concern (the include/exclude rules, the modloader+version, the modpack directory itself), split out ofConfigurationHandlerso each is small and unit-testable.InclusionSpecification— one include-rule: a source, an optional destination, and optional inclusion/exclusion regex-filters. (Deliberately not adata class, to keep the plugin API stable.)ExclusionFilter— how client-only mods get excluded (the matching strategy).ModpackManifestParser— reads a modpack exported from a launcher (CurseForge, Modrinth, ATLauncher, GDLauncher, MultiMC/Prism) and pre-fills aPackConfigfrom its manifest, so users don't type everything by hand.ModpackZipInspector— peeks inside a modpack ZIP to list its contents and judge whether it's a valid full modpack (hasmods/configat the root).ModpackSource— an enum marking where a modpack came from.SupportedModloaders— the single source of truth for which loaders exist (their detection regexes and canonical names). Do not re-hardcode loader names elsewhere.ConfigCheck— a small result-holder bundling each check-type's pass/fail and any errors.
See: Description
-
Class Summary Class Description ConfigCheck Conveniently access all different check-types, whether they passed and which errors, if any, were encountered. ConfigurationHandler Check any given PackConfig for errors and, if so desired, add them to a passed list of errors, so you may display them in a GUI, CLI or website. InclusionSpecification A FileInclusionSpecification is at minimum a source-declaration from which files and directories will be included in the server pack to be generated. InclusionsValidator Validator for the inclusions-concern of a server pack configuration: existing sources, valid destinations, valid in-/exclusion-filter regexes and the lazy-mode special-case. ModloaderValidator Validator for the modloader-concern of a server pack configuration: whether a supported modloader was specified and whether the modloader-version exists for the given Minecraft-version, verified against the version-meta. ModpackDirectoryValidator Validator for the modpack-directory-concern of a server pack configuration: existence, type and the absence of the overrides-directory which marks uninstalled modpack-exports. ModpackManifestParser Parser deriving PackConfig-values from the manifests of various launchers: CurseForge (manifest.json, minecraftinstance.json), Modrinth (modrinth.index.json), ATLauncher (instance.json), GDLauncher (config.json, instance.json) and MultiMC/Prism (mmc-pack.json, instance.cfg), including modloader-name normalization. ModpackZipInspector Inspector for modpack ZIP-archives: lists their contents and checks their validity as modpacks (full-pack layout with mods- and config-directories in the archive-root). PackConfig A PackConfig contains the settings required to create a server pack. PackConfigKt -
Enum Summary Enum Description ExclusionFilter Method by which to exclude mods during the generation of a server pack. ModpackSource Source-indicator for where the modpack came from. -
Object Summary Object Description Companion The start-script placeholder defaults every new configuration begins with. SupportedModloaders The single source of truth for the modloaders supported by ServerPackCreator: their exact-match regexes for case-insensitive loader-detection and their canonical names.