documentation:fabric_mod_json
Differences
This shows you the differences between two versions of the page.
Next revision | Previous revision | ||
documentation:fabric_mod_json [2019/05/20 14:28] – created falseresync | documentation:fabric_mod_json [2023/12/27 12:53] (current) – ↷ Page name changed from documentation:fabric_mod_json_spec to documentation:fabric_mod_json mineblock11 | ||
---|---|---|---|
Line 1: | Line 1: | ||
====== fabric.mod.json ====== | ====== fabric.mod.json ====== | ||
+ | |||
+ | 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 '' | * **schemaVersion** Needed for internal mechanisms. Must always be '' | ||
- | * **id** Defines the mod's identifier - a string of Latin letters, digits, underscores with length from 1 to 63. | + | * **id** Defines the mod's identifier - a string of Latin letters, digits, underscores with length from 2 to 64. |
* **version** Defines the mod's version - a string value, optionally matching the [[https:// | * **version** Defines the mod's version - a string value, optionally matching the [[https:// | ||
Line 11: | 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**: | * **environment**: | ||
* **'' | * **'' | ||
Line 16: | Line 19: | ||
* **server** Runs on the server side. | * **server** Runs on the server side. | ||
* **entrypoints** Defines main classes of your mod, that will be loaded. | * **entrypoints** Defines main classes of your mod, that will be loaded. | ||
- | * There are 3 entry points for your mod: | + | * There are 3 default |
* **main** Will be run first. For classes implementing '' | * **main** Will be run first. For classes implementing '' | ||
* **client** Will be run second and only on the client side. For classes implementing '' | * **client** Will be run second and only on the client side. For classes implementing '' | ||
Line 27: | Line 30: | ||
] | ] | ||
</ | </ | ||
- | * If you're using any other language, | + | * If you're using any other language, |
- | " | + | |
- | { | + | |
- | " | + | |
- | " | + | |
- | } | + | |
- | ] | + | |
- | </ | + | |
* **jars** A list of nested JARs inside your mod's JAR to load. Before using the field, check out [[tutorial: | * **jars** A list of nested JARs inside your mod's JAR to load. Before using the field, check out [[tutorial: | ||
" | " | ||
Line 60: | Line 57: | ||
==== Dependency resolution ==== | ==== Dependency resolution ==== | ||
+ | The key of each entry of the objects below is a Mod ID of the dependency. | ||
+ | |||
+ | The value of each key is a string or array of strings declaring supported version ranges. In the case of an array, an " | ||
+ | |||
+ | 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. Without them a game will crash. | ||
Line 66: | Line 68: | ||
* **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. With them a game will 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. With them a game will log a warning. | ||
- | |||
==== Metadata ==== | ==== Metadata ==== | ||
Line 92: | Line 93: | ||
===== Custom fields ===== | ===== Custom fields ===== | ||
- | You can add any field you want to add. Loader would ignore them. However //it's highly recommended to namespace your fields// to avoid conflicts if your fields (names) would be added to the standard specification. | + | You can add any field you want to add inside '' |
documentation/fabric_mod_json.txt · Last modified: 2023/12/27 12:53 by mineblock11