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.
1
. *
Runs everywhere. Default.ModInitializer
.ClientModInitializer
.DedicatedServerModInitializer
."main": [ "net.fabricmc.example.ExampleMod", "net.fabricmc.example.ExampleMod::handle" ]
file
key. That should be a path inside your mod's JAR to the nested JAR. For example: "jars": [ { "file": "nested/vendor/dependency.jar" } ]
"languageAdapters": { "kotlin": "net.fabricmc.language.kotlin.KotlinAdapter" }
"mixins": [ "modid.mixins.json", { "config": "modid.client-mixins.json", "environment": "client" } ]
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 “OR” relationship is assumed - that is, only one range has to match for the collective range to be satisfied.
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.
irc://irc.esper.net:6667/charset
for #charset
at EsperNet - the port is optional, and assumed to be 6667 if not present.
You can add any field you want to add inside custom
field. 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.