WORK IN PROGRESS, SPEC VERSION 0.3
- All files are JSON files with the
.jsonextension. - All keys use camelCase, only [a-zA-Z0-9].
- All values follow the pattern
TODOunless otherwise noted. - All values default to an empty String or 0, unless otherwise noted.
- All keys marked as
Requiredare Required to be specified and don't have a default value. - All keys marked as
Sidedshould be specified under the root object if there no separate client/server artifacts or under theclient/serverkey if there are separate client/server artifacts. - All keys marked as
IgnoreCaseare checked withequalsIgnoreCaseor equivalent. - See
Extra Informationfor information on preset values.
A Package could represent a Mod, Mod Loader, Library, or anything else that has artifacts that could be downloaded, installed or used.
A Version represents a single artifact, such as a .jar file.
specVersion(Number) (Required): The spec version the file follows.
type(String) (IgnoreCase): The type ofPackagethis represents. SeePackage Typefor more information.id(String) (Required): A unique id that identifies thisPackagewithin the network. Does not have to be the mod id.name(String): A simple name that can be displayed to the user.description(String): A short description on what thePackageis.license(String or Array of Strings): The license identifier(s) thePackageArtifactsare licensed under (Use https://spdx.org/licenses/ to lookup yours).authors(Array of Strings): An array of names of people who are considered authors of thisPackage.icon(String): A URL to a image that can be shown as a icon.projectLinks(Array): An Array of ProjectLink Objects, that contains urls that could be displayed to the user.type(String) (Required) (IgnoreCase): An identifier that describes the url, such asDiscordfor a discord invite link.url(String) (Required): A url that the user can go to. Follows the patterntodo.
id(String) (Required): APackageunique identifier that identifies thisVersionwithin the network. Should match theidof the file.releaseType(String): One ofreleaseorbeta.installType(String): One ofmodsorjarMod.changelog(String): A url to a changelog file.side(String): One ofclient,serveroruniversal. Default is universal.relationships(Array): An Array of Relationship Objects.type(String) (Required) (IgnoreCase): Eitherrequired,recommended,suggested,conflicts,breaks.id(String) (Required): ThePackageid.version(String or Array of Strings): The version(s) to match. SeeVersion Matchbelow for more information.side(String): One ofclient,serveroruniversal. Default is universal.
artifacts(Array) (Required): An Array ofArtifactObjects.type(String) (Required) (IgnoreCase): The type of download or download service theArtifactcan be gotten from, such asdirectfor a direct url download.id(String) (Required): The id that identifies theArtifactwith the service, could be a URL/file id/maven id.side(String): One ofclient/server/universal. Default isuniversal.
hashes(Object) (Required) (Sided): Key is hash type, value is hash. Used to verify downloaded artifact.size(Number) (Required) (Sided): Size of artifact in bytes.filename(String) (Sided): The file name (For mods) or maven location (Non-Mods) to save to. Best to use default. Default is{packagename}-{version}.jar.client/server(Object) (Sided): Specifies keys for the specified side.releaseTime(String): When the version was released. Must useISO 8601date time format.
mainClass(String) (Required) (Sided): Main class used to launch minecraft.launchargs(String) (Required) (Sided): Launch arguments used to launch minecraft.tweakers(Array of Strings) (Sided): Tweakers for minecraft.libraries(Array): Array ofLibraryObjects.type(String) (Required): Type of Library. Such asjar,natives-windows.id(String) (Required): Maven ID.url(String) (Required): Maven Repository its stored in.side(String): Eitherclient,server, orcommon. Defaultcommon.size(Number): Size of artifact in bytes.hashes(Object) (Required): Key is hash type, value is hash. Used to verify downloaded artifact.
releasetype(String): One ofrelease,snapshot,beta,alpha.mainClass(String) (Required) (Sided): Main class used to launch minecraft.launchargs(String) (Required) (Sided): Launch arguments used to launch minecraft.libraries(Array): Array ofLibraryObjects.type(String) (Required): Type of Library. Such asjar,natives-windows.id(String) (Required): Maven ID.url(String) (Required): Maven Repository its stored in.side(String): Eitherclient,server, orcommon. Defaultcommon.size(Number): Size of artifact in bytes.hashes(Object) (Required): Key is hash type, value is hash. Used to verify downloaded artifact.
assetIndex(Object) (Required):id(String) (Required):url(String) (Required):sha1(String) (Required):size(Number) (Required):totalSize(Number) (Required):
traits(Array of Strings): Special keys that specify what this version is capable/not capable of, or how it should be launched, such asno-texturepacks.
Mod: The default type. TheArtifactwould be placed in themodsfolder.Modloader: Specifies this is a modloader and uses theModloader Version Extensionsspec.Library: If a mod is declared as a Library, then it can only be used by modloaders using theLibrarieskey in theModloader Version Extensionsspec. It would allow the user to select a different version, but CANNOT be installed manually.Minecraft: Only used by Minecraft files.Modpack: Used for modpacks.
There are 5 types of relationships a Package can have.
(X is the dependency, Y is the dependent)
Required: X MUST be included for a successful install.Recommended: X SHOULD be included, a warning message should be shown to the user asking confirmation to install X along with Y.Suggested: If X is included, use the version match provided.Conflicts: If X is included, a warning message should be shown to the user stating there may be a conflict between X and Y.Breaks: If X is included, a error message should be shown to the user stating Y can not be installed with X.
maybe something like https://fabricmc.net/wiki/format:modjson#versionrange
- Modloader spec requirements
- Modpack spec
- Alpha/Beta/Stable/Recommended version types
- Tags for Mods
specVersionvsformatVersionidvsuid- hash to package+version database (something like "sha256:somehash":"amod:1.0.0")
- cf slug to package database
- cf id to package database
- Remove
discoverersfrom the spec and only use for upstream/intermediary usage - Hashes for Version must have server side and client side as well as universal
Fabric is split into three parts:
- Fabric Loader (fabricloader) (loads fabric/mappings/mods)
- Yarn (yarn) (mappings)
- Fabric API (fabric) (useful api for mod developers, not required but almost always used) Fabric Loader will need a custom script to get all the information required.
Forge requires alot more than fabric, investigation pending...
- https://github.com/MinecraftForge/Installer
- https://github.com/MinecraftForge/InstallerTools
- FMLLauncher (https://github.com/MinecraftForge/MinecraftForge/tree/1.13.x/src/fmllauncher) loads the following files:
- Requires forge at libraries/net/minecraftforge/forge/1.13.2-25.0.110/forge-1.13.2-25.0.110-universal.jar
- Requires patched minecraft at libraries/net/minecraftforge/forge/1.13.2-25.0.110/forge-1.13.2-25.0.110-client.jar
- Requires SRG MC at libraries/net/minecraft/client/1.13.2-20190213.203750/client-1.13.2-20190213.203750-srg.jar
- Requires MC Extra at libraries/net/minecraft/client/1.13.2/client-1.13.2-srg.jar
- Read install_profile.json
- Extract version.json to minecraft versions path
- Download minecraft jar
- Download Libraries
- Run PostProcessing Mess
-
- InstallerTools - MCP_DATA - Download MCP_CONFIG - Extract
-
- JarSplitter - Splits minecraft jar into SLIM and EXTRA jars. Slim contains every class file. Extra contains everything else (assets, data, meta-inf, etc)
-
- InstallerTools - CREATE_PARENTS - Simply creates the folders in library for the unobf client jar
-
- SpecialSource - Takes SLIM jar and srg mappings and deobf the jar and outputs to client-MC_VERSION-SRG_VERSION-srg.jar (placed in folder created in 3.)
-
- BinaryPatcher - Takes the srg jar and a patch file and outputs the forge patched client jar
-
- Inject Profile to launcher profiles