Skip to content

Dependency Overrides

AlexIIL edited this page Apr 2, 2023 · 2 revisions

Mod dependencies can be changed by creating a json config file <mc-dir>/config/quilt-loader-overrides.json.

When creating overrides it's helpful to set the system property loader.debug.dump_override_paths to true by adding -Dloader.debug.dump_override_paths=true to your Java/JVM Arguments in your launcher. This prints every path you need to use when overriding mods.

This is the basic structure of an override json file:

{
  "schema_version": 1,
  "overrides": [
    {
      "path": "<mods>/my-mod.1.6.2.jar",
      "depends": [],
      "breaks": []
    }
  ]
}

The path should be one of the paths printed by loader.debug.dump_override_paths.

The depends and breaks fields are arrays of override objects, which may be any of the following:

Additions

{
  "add": {
    // New dependency
  }
}

Additions are new dependencies. The object in add must be a valid dependency object, as specified in the quilt.mod.json specification.

Removals

{
  "remove": {
    // Dependency to remove
  }
}

Removals match a single dependency in the target mod and removes it. Like additions, these must also be a valid dependency object, as specified in the quilt.mod.json specification.

A warning will be printed in the log file if this fails to find a match.

Replacements

{
  "replace": {
    // Dependency to remove
  },
  "with": {
    // Dependency to add
  },
}

Replacements match a single dependency in the target mod and removes it, then adds a new dependency. This is slightly more compact than an add/remove pair, and also only adds a new dependency if the old one was found.

Clone this wiki locally