-
-
Notifications
You must be signed in to change notification settings - Fork 1.6k
/
fabric.mod.json
330 lines (330 loc) · 11.1 KB
/
fabric.mod.json
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
{
"$schema": "http://json-schema.org/draft-07/schema#",
"$id": "https://json.schemastore.org/fabric.mod.json",
"definitions": {
"entrypoint": {
"oneOf": [
{
"type": "object",
"properties": {
"adapter": {
"type": "string",
"description": "The language adapter to use",
"default": "default"
},
"value": {
"type": "string",
"description": "The entrypoint function or class"
}
},
"required": ["value"]
},
{
"type": "string",
"description": "The entrypoint function or class"
}
]
},
"contactInfo": {
"type": "object",
"properties": {
"email": {
"type": "string",
"description": "Contact e-mail pertaining to the mod"
},
"irc": {
"type": "string",
"description": "IRC channel pertaining to the mod. Must be of a valid URL format"
},
"homepage": {
"type": "string",
"description": "Project or user homepage. Must be a valid HTTP/HTTPS address"
},
"issues": {
"type": "string",
"description": "Project issue tracker. Must be a valid HTTP/HTTPS address"
},
"sources": {
"type": "string",
"description": "Project source code repository. Must be a valid URL"
}
},
"additionalProperties": {
"type": "string",
"description": "Custom contact or profile information"
}
},
"environment": {
"type": "string",
"enum": ["*", "client", "server"],
"description": "The environment where this mod will be loaded"
},
"nestedJar": {
"type": "object",
"properties": {
"file": {
"type": "string",
"description": "A string value pointing to a path from the root of the JAR to a nested JAR which should be loaded alongside the outer mod JAR"
}
},
"required": ["file"]
},
"person": {
"oneOf": [
{
"type": "string",
"description": "The name of the person"
},
{
"type": "object",
"properties": {
"name": {
"type": "string",
"description": "The name of the person"
},
"contact": {
"$ref": "#/definitions/contactInfo",
"description": "Contact information for the person"
}
},
"required": ["name"]
}
]
},
"versionRanges": {
"oneOf": [
{
"$ref": "#/definitions/versionRange"
},
{
"type": "array",
"description": "Multiple version ranges that are combined with an \"OR\" relationship - only one of the ranges needs to match",
"items": {
"$ref": "#/definitions/versionRange"
}
}
]
},
"versionRange": {
"type": "string",
"description": "A version range that matches versions. The following variants are supported:\n\n- A single asterisk matches any version.\n- Ranges following NPM semver specification including >=, >, =, <, <=, X-ranges (1.x), tilde ranges (fixed minor) and caret ranges (fixed major).\n- Additionally exact string matches will always be performed.",
"x-intellij-html-description": "<p>A version range or an array of those that match versions. The following variants are supported:</p><ul><li><code>*</code> matches any version.</li><li>Ranges following <a href=\"https://docs.npmjs.com/about-semantic-versioning\">NPM semver specification</a>:<ul><li><code>>=</code>, <code>></code>, <code>=</code>, <code><</code> and <code><</code></li><li>X-ranges to specify variable components, e.g. <code>1.x</code></li><li>tilde ranges that allow patch version changes, e.g. <code>~1.2.3</code></li><li>caret ranges that allow up to minor version changes, e.g. <code>^1.2.3</code></li></ul></li><li>Exact string matches are always performed as well.</li></ul><p>If an array of ranges is used, they're treated as in an \"OR\" relationship - only one of the ranges needs to match.</p>",
"markdownDescription": "A version range or an array of those that match versions. The following variants are supported:\n\n- `*` matches any version.\n- Ranges following [NPM semver specification](https://docs.npmjs.com/about-semantic-versioning):\n - `>=`, `>`, `=`, `<` and `<=`\n - X-ranges to specify variable components, e.g. `1.x`\n - tilde ranges that allow patch version changes, e.g. `~1.2.3`\n - caret ranges that allow up to minor version changes, e.g. `^1.2.3`\n- Exact string matches are always performed as well.\n\nIf an array of ranges is used, they're treated as in an \"OR\" relationship - only one of the ranges needs to match."
}
},
"properties": {
"id": {
"type": "string",
"pattern": "^[a-z][a-z0-9-_]{1,63}$",
"description": "The mod identifier"
},
"version": {
"type": "string",
"description": "The mod version"
},
"schemaVersion": {
"type": "integer",
"description": "The version of the fabric.mod.json schema",
"const": 1
},
"environment": {
"$ref": "#/definitions/environment"
},
"entrypoints": {
"type": "object",
"properties": {
"main": {
"type": "array",
"items": {
"$ref": "#/definitions/entrypoint"
},
"description": "The entrypoint for all environments (classes must implement ModInitializer)"
},
"client": {
"type": "array",
"items": {
"$ref": "#/definitions/entrypoint"
},
"description": "The entrypoint for the client environment (classes must implement ClientModInitializer)"
},
"server": {
"type": "array",
"items": {
"$ref": "#/definitions/entrypoint"
},
"description": "The entrypoint for the server environment (classes must implement DedicatedServerModInitializer)"
},
"preLaunch": {
"type": "array",
"items": {
"$ref": "#/definitions/entrypoint"
},
"description": "The entrypoint called just before the game instance is created (classes must implement PreLaunchEntrypoint)"
},
"fabric-datagen": {
"type": "array",
"items": {
"$ref": "#/definitions/entrypoint"
},
"description": "The entrypoint for the data generator environment (classes must implement DataGeneratorEntrypoint)"
},
"fabric-gametest": {
"type": "array",
"items": {
"$ref": "#/definitions/entrypoint"
},
"description": "The entrypoint for the Game Test environment (classes must implement FabricGameTest)"
}
},
"additionalProperties": {
"type": "array",
"items": {
"$ref": "#/definitions/entrypoint"
},
"description": "Custom mod entrypoints"
},
"description": "The entrypoints used by this mod"
},
"jars": {
"type": "array",
"description": "Contains an array of nestedJar objects",
"items": {
"$ref": "#/definitions/nestedJar"
}
},
"languageAdapters": {
"type": "object",
"description": "A string→string dictionary, connecting namespaces to LanguageAdapter implementations",
"additionalProperties": {
"type": "string"
}
},
"mixins": {
"type": "array",
"items": {
"oneOf": [
{
"type": "string",
"description": "Path to mixin file from the root of the JAR"
},
{
"type": "object",
"properties": {
"config": {
"type": "string",
"description": "Path to mixin file from the root of the JAR"
},
"environment": {
"$ref": "#/definitions/environment"
}
}
}
]
}
},
"accessWidener": {
"type": "string",
"description": "Path to an access widener definition file"
},
"depends": {
"type": "object",
"description": "id→versionRange map for dependencies. Failure to meet these causes a hard failure",
"additionalProperties": {
"$ref": "#/definitions/versionRanges"
}
},
"recommends": {
"type": "object",
"description": "id→versionRange map for dependencies. Failure to meet these causes a soft failure (warning)",
"additionalProperties": {
"$ref": "#/definitions/versionRanges"
}
},
"suggests": {
"type": "object",
"description": "id→versionRange map for dependencies. Are not matched and are mainly used as metadata",
"additionalProperties": {
"$ref": "#/definitions/versionRanges"
}
},
"conflicts": {
"type": "object",
"description": "id→versionRange map for dependencies. A successful match causes a soft failure (warning)",
"additionalProperties": {
"$ref": "#/definitions/versionRanges"
}
},
"breaks": {
"type": "object",
"description": "id→versionRange map for dependencies. A successful match causes a hard failure",
"additionalProperties": {
"$ref": "#/definitions/versionRanges"
}
},
"name": {
"type": "string",
"description": "Name of the mod"
},
"description": {
"type": "string",
"description": "Description of the mod"
},
"authors": {
"type": "array",
"items": {
"$ref": "#/definitions/person"
},
"description": "The direct authorship information"
},
"contributors": {
"type": "array",
"items": {
"$ref": "#/definitions/person"
},
"description": "Contributors to this mod"
},
"contact": {
"$ref": "#/definitions/contactInfo",
"description": "Contact information for the mod"
},
"license": {
"oneOf": [
{
"type": "string"
},
{
"type": "array",
"items": {
"type": "string"
}
}
],
"description": "The license the mod uses"
},
"icon": {
"oneOf": [
{
"type": "string",
"description": "The path to a single .PNG file from the root of the JAR"
},
{
"type": "object",
"description": "A string→string dictionary, where the keys conform to widths of each PNG file, and the values are said files' paths",
"propertyNames": {
"pattern": "^[1-9][0-9]*$"
},
"additionalProperties": {
"type": "string",
"description": "The path to a single .PNG file from the root of the JAR"
}
}
]
},
"custom": {
"type": "object",
"description": "A map of namespace:id→value for custom data fields."
}
},
"required": ["id", "version", "schemaVersion"],
"type": "object"
}