Skip to content

Interface DependencyObject

A dependency object defines what mods/plugins a given mod depends on or breaks. It can be represented as either an object containing at least the id field, a string mod identifier in the form of either mavenGroup:modId or modId, or an array of dependency objects. If an array of dependency objects is provided, the dependency matches if it matches ANY of the dependency objects for the "depends" and "unless" fields, and ALL for the "breaks" field.

🏷️ Properties

id

ts
id: string

A mod identifier in the form of either mavenGroup:modId or modId.

Defined in: packages/mod-parser/quilt.ts:24

optional optional

ts
optional: boolean

Dependencies marked as optional will only be checked if the mod/plugin specified by the id field is present.

Defined in: packages/mod-parser/quilt.ts:39

reason optional

ts
reason: string

A short, human-readable reason for the dependency object to exist.

Defined in: packages/mod-parser/quilt.ts:35

unless optional

ts
unless: DependencyObject

Describes situations where this dependency can be ignored. For example:

{
    "id": "sodium",
    "unless": "indium"
}

Game providers and loader plugins can also add their own optional fields to the dependency object for extra context when resolving dependencies. The Minecraft game provider, for instance, might define an "environment" field that can be used like so:

{
    "id": "modmenu",
    "environment": "client"
}

Defined in: packages/mod-parser/quilt.ts:59

versions optional

ts
versions: string | string[]

Should be a version specifier or array of version specifiers defining what versions this dependency applies to. If an array of versions is provided, the dependency matches if it matches ANY of the listed versions.

Defined in: packages/mod-parser/quilt.ts:31