documentation:fabric_mod_json_spec
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
documentation:fabric_mod_json_spec_old [2023/06/10 12:02] – removed - external edit (Unknown date) 127.0.0.1 | documentation:fabric_mod_json_spec [2023/12/27 12:54] (current) – mineblock11 | ||
---|---|---|---|
Line 1: | Line 1: | ||
+ | ====== fabric.mod.json Specification ====== | ||
+ | In all cases, the mod JSON, '' | ||
+ | |||
+ | * an object containing a " | ||
+ | * or an array containing such objects (this is not supported by Loader as of 0.4.0, but is a part of the specification). | ||
+ | |||
+ | If a " | ||
+ | |||
+ | It is important to remember that the Fabric mod JSON is **authoritative**. This means that Loader relies on it specifically to gather the necessary information - from the perspective of an external tool, its contents can be trusted and relied upon. | ||
+ | |||
+ | ===== Version 1 (current) ===== | ||
+ | |||
+ | **Pertains to Loader 0.4.0 and above.** | ||
+ | |||
+ | ==== Types ==== | ||
+ | |||
+ | === ContactInformation === | ||
+ | |||
+ | A string-> | ||
+ | |||
+ | The following keys are officially defined: | ||
+ | |||
+ | * **email**: Contact e-mail pertaining to the mod. Must be a valid e-mail address. | ||
+ | * **irc**: IRC channel pertaining to the mod. Must be of a valid URL format - for example: '' | ||
+ | * **homepage**: | ||
+ | * **issues**: Project issue tracker. Must be a valid HTTP/HTTPS address. | ||
+ | * **sources**: | ||
+ | |||
+ | There are no mandatory keys. | ||
+ | |||
+ | The list is not exhaustive - mods may provide additional, non-standard keys (such as **discord**, | ||
+ | |||
+ | === EntrypointContainer === | ||
+ | |||
+ | An EntrypointContainer is an object. | ||
+ | |||
+ | The keys match the getEntrypoints() " | ||
+ | |||
+ | * " | ||
+ | * " | ||
+ | * " | ||
+ | * " | ||
+ | |||
+ | Fabric, by default, will run all " | ||
+ | |||
+ | === NestedJarEntry === | ||
+ | |||
+ | An object with the following keys, of which only " | ||
+ | |||
+ | * " | ||
+ | |||
+ | === Person === | ||
+ | |||
+ | Can be in one of two forms: | ||
+ | |||
+ | * a string (assumed to resolve to a " | ||
+ | * an object. | ||
+ | |||
+ | In the case of an object, the following keys are defined: | ||
+ | |||
+ | * **name**: The real name, or username, of the person. Mandatory. | ||
+ | * **contact** An optional ContactInformation object containing contact information pertaining to the person. | ||
+ | |||
+ | === VersionRange === | ||
+ | |||
+ | A string or array of string declaring supported version ranges in the form ''< | ||
+ | |||
+ | In the case of all versions, '' | ||
+ | |||
+ | Versions compatible with the extended semver format are compared as defined by [[https:// | ||
+ | |||
+ | The following declarations are supported for version strings compatible with this semver superset: | ||
+ | |||
+ | * standalone ''< | ||
+ | * standard operators ''< | ||
+ | * '' | ||
+ | * '' | ||
+ | * '' | ||
+ | * X-Ranges: ''< | ||
+ | |||
+ | All operators always work the same regardless of the version they are matching against, there is no special casing for '' | ||
+ | ==== Mandatory fields ==== | ||
+ | |||
+ | * **id**: Contains the mod identifier - a string value matching the '' | ||
+ | * **version**: | ||
+ | |||
+ | ==== Optional fields (mod loading) ==== | ||
+ | |||
+ | * **environment**: | ||
+ | * " | ||
+ | * " | ||
+ | * " | ||
+ | * **entrypoints**: | ||
+ | * **jars**: Contains an array of NestedJarEntry objects. If not present, assume empty object. | ||
+ | * **languageAdapters**: | ||
+ | * **mixins**: Contains a list of mixin configuration files for the Mixin library as filenames relative to the mod root - an array of (can be mixed): | ||
+ | * string values, | ||
+ | * objects containing a " | ||
+ | * **accessWidener**: | ||
+ | |||
+ | ==== Optional fields (dependency resolution) ==== | ||
+ | |||
+ | All of the following keys follow the format of a string-> | ||
+ | |||
+ | * **depends**: | ||
+ | * **recommends**: | ||
+ | * **suggests**: | ||
+ | * **conflicts**: | ||
+ | * **breaks**: for these dependencies, | ||
+ | |||
+ | ==== Optional fields (metadata) ==== | ||
+ | |||
+ | * **name**: Contains the user-facing mod name - a string value. If not present, assume it matches **id**. | ||
+ | * **description**: | ||
+ | * **authors**: | ||
+ | * **contributors**: | ||
+ | * **contact**: | ||
+ | * **license**: | ||
+ | * This should provide the complete set of preferred licenses conveying the entire mod package. In other words, compliance with all listed licenses should be sufficient for usage, redistribution, | ||
+ | * For cases where a part of code is dual-licensed, | ||
+ | * To aid automated tools, it is recommended to use [[https:// | ||
+ | * **icon**: Contains the mod's icon, as a square .PNG file. (Minecraft resource packs use 128x128, but that is not a hard requirement - a power of two is, however, recommended.) Can be provided in one of two forms: | ||
+ | * A string, providing the path (from the mod's root) to a single .PNG file, | ||
+ | * A string-> | ||
+ | |||
+ | ==== Custom fields ==== | ||
+ | |||
+ | A **custom** field can be provided in the JSON. It is a dictionary of string keys to JSON elements, and the contents of said JSON elements are entirely arbitrary. The Fabric loader will make no effort to read its contents, aside from a situation in which custom features in older schema versions become official in future schema versions, as a compatibility measure - those will be adequately documented. | ||
+ | |||
+ | It is recommended that the keys be namespaced with the ID of the mod relying on them (if such a mod exists) to prevent conflicts. | ||
+ | |||
+ | ===== Version 0 ===== | ||
+ | |||
+ | This version is utilized if the " | ||
+ | |||
+ | //TODO: Document me!// |
documentation/fabric_mod_json_spec.txt · Last modified: 2023/12/27 12:54 by mineblock11