User Tools

Site Tools


documentation:fabric_mod_json

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
documentation:fabric_mod_json [2019/11/16 19:00] – fix the curse fudgedocumentation:fabric_mod_json [2025/10/05 07:17] (current) – rephrase the result of adding dependencies/conflicts skyland1a
Line 2: Line 2:
  
 The fabric.mod.json file is a mod metadata file used by Fabric Loader to load mods. In order to be loaded, a mod must have this file with the exact name placed in the root directory of the mod JAR. The fabric.mod.json file is a mod metadata file used by Fabric Loader to load mods. In order to be loaded, a mod must have this file with the exact name placed in the root directory of the mod JAR.
 +
 ===== Mandatory fields ===== ===== Mandatory fields =====
  
    * **schemaVersion** Needed for internal mechanisms. Must always be ''1''    * **schemaVersion** Needed for internal mechanisms. Must always be ''1''
-   * **id** Defines the mod's identifier - a string of Latin letters, digits, underscores with length from to 63.+   * **id** Defines the mod's identifier - a string of Latin letters, digits, underscores with length from to 64.
    * **version** Defines the mod's version - a string value, optionally matching the [[https://semver.org/|Semantic Versioning 2.0.0]] specification.    * **version** Defines the mod's version - a string value, optionally matching the [[https://semver.org/|Semantic Versioning 2.0.0]] specification.
  
Line 12: Line 13:
 ==== Mod loading ==== ==== Mod loading ====
  
 +   * **provides**:Defines the list of ids of mod. It can be seen as the aliases of the mod. Fabric Loader will treat these ids as mods that exist. If there are other mods using that id, they will not be loaded.
    * **environment**: Defines where mod runs: only on the client side (client mod), only on the server side (plugin) or on both sides (regular mod). Contains the environment identifier:    * **environment**: Defines where mod runs: only on the client side (client mod), only on the server side (plugin) or on both sides (regular mod). Contains the environment identifier:
       * **''*''** Runs everywhere. Default.       * **''*''** Runs everywhere. Default.
Line 61: Line 63:
 In the case of all versions, * is a special string declaring that any version is matched by the range. In addition, exact string matches must be possible regardless of the version type. In the case of all versions, * is a special string declaring that any version is matched by the range. In addition, exact string matches must be possible regardless of the version type.
  
-   * **depends** For dependencies required to run. Without them a game will crash. +   * **depends** For dependencies required to run. If any are missing, Fabric Loader will trigger a crash. 
-   * **recommends** For dependencies not required to run. Without them a game will log a warning.+   * **recommends** For dependencies not required to run. For each missing dependency, Fabric Loader will log a warning.
    * **suggests** For dependencies not required to run. Use this as a kind of metadata.    * **suggests** For dependencies not required to run. Use this as a kind of metadata.
-   * **breaks** For mods whose together with yours might cause a game crash. With them a game will crash. +   * **breaks** For mods whose together with yours might cause a game crash. If any are present, Fabric Loader will trigger a crash. 
-   * **conflicts** For mods whose together with yours cause some kind of bugs, etc. With them a game will log a warning.+   * **conflicts** For mods whose together with yours cause some kind of bugs, etc. For each conflicting mod present, Fabric Loader will log a warning.
 ==== Metadata ==== ==== Metadata ====
  
documentation/fabric_mod_json.1573930828.txt.gz · Last modified: 2019/11/16 19:00 by fudge