You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/gettingstarted/modfiles.md
+9-8Lines changed: 9 additions & 8 deletions
Original file line number
Diff line number
Diff line change
@@ -122,14 +122,15 @@ The features system allows mods to demand that certain settings, software, or ha
122
122
123
123
Mods can specify their dependencies, which are checked by NeoForge before loading the mods. These configurations are created using the [array of tables][array]`[[dependencies.<modid>]]`, where `modid` is the identifier of the mod that consumes the dependency.
124
124
125
-
| Property | Type | Default | Description | Example |
|`modId`| string |**mandatory**| The identifier of the mod added as a dependency. |`modId="jei"`|
128
-
|`mandatory`| boolean |**mandatory**| Whether the game should crash when this dependency is not met. |`mandatory=true`|
129
-
|`versionRange`| string |`""`| The acceptable version range of the language loader, expressed as a [Maven Version Range][mvr]. An empty string matches any version. |`versionRange="[1, 2)"`|
130
-
|`ordering`| string |`"NONE"`| Defines if the mod must load before (`"BEFORE"`) or after (`"AFTER"`) this dependency. If the ordering does not matter, return `"NONE"`|`ordering="AFTER"`|
131
-
|`side`| string |`"BOTH"`| The [physical side][dist] the dependency must be present on: `"CLIENT"`, `"SERVER"`, or `"BOTH"`. |`side="CLIENT"`|
132
-
|`referralUrl`| string |*nothing*| A URL to the download page of the dependency. Currently unused. |`referralUrl="https://library.example.com/"`|
125
+
| Property | Type | Default | Description | Example |
|`modId`| string |**mandatory**| The identifier of the mod added as a dependency. |`modId="jei"`|
128
+
|`type`| string |`"required"`| Specifies the nature of this dependency: `"required"` is the default and prevents the mod from loading if this dependency is missing; `"optional"` will not prevent the mod from loading if the dependency is missing, but still validates that the dependency is compatible; `"incompatible"` prevents the mod from loading if this dependency is present; `"discouraged"` still allows the mod to load if the dependency is present, but presents a warning to the user. |`type="incompatible"`|
129
+
|`reason`| string |*nothing*| An optional user-facing message to describe why this dependency is required, or why it is incompatible. |
130
+
|`versionRange`| string |`""`| The acceptable version range of the language loader, expressed as a [Maven Version Range][mvr]. An empty string matches any version. |`versionRange="[1, 2)"`|
131
+
|`ordering`| string |`"NONE"`| Defines if the mod must load before (`"BEFORE"`) or after (`"AFTER"`) this dependency. If the ordering does not matter, return `"NONE"`|`ordering="AFTER"`|
132
+
|`side`| string |`"BOTH"`| The [physical side][dist] the dependency must be present on: `"CLIENT"`, `"SERVER"`, or `"BOTH"`. |`side="CLIENT"`|
133
+
|`referralUrl`| string |*nothing*| A URL to the download page of the dependency. Currently unused. |`referralUrl="https://library.example.com/"`|
133
134
134
135
:::danger
135
136
The `ordering` of two mods may cause a crash due to a cyclic dependency, for example if mod A must load `"BEFORE"` mod B and at the same time, mod B must load `"BEFORE"` mod A.
0 commit comments