Managing Mods
Mods are declared in the [mods] table of mc.toml and installed when the
instance starts. Each entry maps a mod's identifier on the mod registry to the
version to install:
[minecraft]
version = "..."
loader = "fabric"
[mods]
lithium = "..."
A mod loader must be configured under [minecraft] for mods to be installed;
without one, the [mods] table is ignored. See
The Manifest Format for every supported form of a
mod entry, including mods fetched from a direct URL.
Adding and removing mods
mc add and mc remove edit
the [mods] table for you. mc add looks the mod up on the registry and pins
the latest version compatible with the configured Minecraft version and
loader:
$ mc add sodium lithium
$ mc remove sodium
Updating mods
mc update re-pins mods to the latest compatible
version — every mod in the manifest, or only the ones you name:
$ mc update
$ mc update lithium
Mods fetched from a direct URL have no version to compare and are skipped.
How mods are installed
Changes to [mods] take effect the next time the instance starts. On
startup, mc resolves each entry — including its required dependencies — and
records the result in the mc.lock lockfile. It then downloads any mod that
is missing and deletes any mod that is no longer in the lockfile.
Two consequences of this are worth knowing:
- You do not need to declare a mod's dependencies; they are resolved and installed automatically.
- The instance's
modsdirectory is fully managed by mc. A jar placed there by hand is removed on the next start. To install a mod that is not on the registry, declare it in the manifest with aurlentry instead.