format:modjson
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revisionLast revisionBoth sides next revision | ||
format:modjson [2019/03/06 09:31] – new initializer definition asie | format:modjson [2019/05/20 14:28] – falseresync | ||
---|---|---|---|
Line 1: | Line 1: | ||
- | ====== fabric.mod.json format ====== | + | This page moved [[documentation:fabric_mod_json|here]]! |
- | + | ||
- | 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**. | + | |
- | + | ||
- | ===== Version 1 (current) ===== | + | |
- | + | ||
- | //TODO: Work in progress!// | + | |
- | + | ||
- | ==== 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**, | + | |
- | + | ||
- | === InitializerEntry === | + | |
- | + | ||
- | Fundamentally, | + | |
- | + | ||
- | * " | + | |
- | * " | + | |
- | * " | + | |
- | + | ||
- | (Non-format-specific note: In general, the method strings are sorted according to the types (with order preserved within a type - Fabric will run all " | + | |
- | + | ||
- | Alternatively, | + | |
- | + | ||
- | * '' | + | |
- | * '' | + | |
- | * '' | + | |
- | * '' | + | |
- | + | ||
- | where each word corresponds to the matching string above. | + | |
- | + | ||
- | === 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 case of an array, an " | + | |
- | + | ||
- | In the case of all versions, '' | + | |
- | + | ||
- | For semantic versions, the specification follows a rough subset of the [[https:// | + | |
- | + | ||
- | * '' | + | |
- | * Version ranges - a set of space-delimited comparators of the ''> | + | |
- | * X-Ranges, | + | |
- | * Tilde Ranges, | + | |
- | * Caret Ranges. | + | |
- | + | ||
- | ==== Mandatory fields ==== | + | |
- | + | ||
- | * **id**: Contains the mod identifier - a string value matching the '' | + | |
- | * **version**: | + | |
- | + | ||
- | ==== Optional fields (mod loading) ==== | + | |
- | + | ||
- | * **environment**: | + | |
- | * "", | + | |
- | * " | + | |
- | * " | + | |
- | * **initializers**: | + | |
- | * **jars**: Contains an array of either strings or objects with a string-valued " | + | |
- | * **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 " | + | |
- | + | ||
- | ==== 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. 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!// | + |