Skip to content

Commit d4e10f4

Browse files
authored
Update minecraft-pack-mcmeta.json to match latest schema (SchemaStore#5462)
1 parent b209c15 commit d4e10f4

1 file changed

Lines changed: 88 additions & 11 deletions

File tree

src/schemas/json/minecraft-pack-mcmeta.json

Lines changed: 88 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,27 @@
88
"description": "https://minecraft.wiki/w/Pack_format",
99
"type": "integer",
1010
"minimum": 1,
11-
"maximum": 81
11+
"maximum": 101
12+
},
13+
"packFormatMajorMinor": {
14+
"description": "A pack format version, specified as a single integer (major version) or an array of one or two integers ([major] or [major, minor]). Omitting the minor version is equal to specifying minor version 0.\nhttps://minecraft.wiki/w/Pack_format",
15+
"oneOf": [
16+
{
17+
"type": "integer",
18+
"description": "Major version as an integer. Interpreted as [major, 0].",
19+
"minimum": 1
20+
},
21+
{
22+
"type": "array",
23+
"description": "An array of [major] or [major, minor] version integers. The minor version is optional and assumed to be 0 if not specified.",
24+
"items": {
25+
"type": "integer",
26+
"minimum": 0
27+
},
28+
"minItems": 1,
29+
"maxItems": 2
30+
}
31+
]
1232
},
1333
"packFormatRange": {
1434
"anyOf": [
@@ -38,6 +58,17 @@
3858
}
3959
]
4060
},
61+
"textComponent": {
62+
"description": "A Minecraft text component (raw JSON text).\nhttps://minecraft.wiki/w/Raw_JSON_text_format",
63+
"oneOf": [
64+
{
65+
"type": "string"
66+
},
67+
{
68+
"type": "object"
69+
}
70+
]
71+
},
4172
"resourceLocation": {
4273
"description": "An identifier of a game object\nhttps://minecraft.wiki/w/Resource_location",
4374
"type": "string",
@@ -50,21 +81,44 @@
5081
"type": "object",
5182
"properties": {
5283
"description": {
84+
"$ref": "#/definitions/textComponent",
5385
"title": "description",
54-
"description": "A text component that appears when hovering over the pack's name in the list given by the `/datapack list` command, or when viewing the pack in the Create World screen.",
55-
"type": "string"
86+
"description": "A text component that appears when hovering over the pack's name in the list given by the `/datapack list` command, or when viewing the pack in the Create World screen."
5687
},
5788
"pack_format": {
5889
"$ref": "#/definitions/packFormat",
59-
"description": "Determines the version(s) of Minecraft that this pack is compatible with."
90+
"description": "Determines the version(s) of Minecraft that this pack is compatible with. Optional when supported formats do not include 82 (data pack) or 65 (resource pack) or below, but required otherwise."
91+
},
92+
"min_format": {
93+
"$ref": "#/definitions/packFormatMajorMinor",
94+
"description": "Describes the minimum supported pack format version. Can be an integer or an array of one or two integers ([major] or [major, minor])."
95+
},
96+
"max_format": {
97+
"$ref": "#/definitions/packFormatMajorMinor",
98+
"description": "Describes the maximum supported pack format version. Can be an integer or an array of one or two integers ([major] or [major, minor])."
6099
},
61100
"supported_formats": {
62101
"$ref": "#/definitions/packFormatRange",
63-
"description": "Describes a range for pack formats that this pack supports. The range has to include the value of `pack.pack_format`."
102+
"description": "DEPRECATED. The major versions this pack supports. Has to match the major versions specified in min_format and max_format.\nRequired when the pack declares support for versions either below data pack format 82 or resource pack format 65.\nMust be absent otherwise."
64103
}
65104
},
66105
"additionalProperties": false,
67-
"required": ["description", "pack_format"]
106+
"required": ["description"],
107+
"anyOf": [
108+
{
109+
"properties": {
110+
"pack_format": {}
111+
},
112+
"required": ["pack_format"]
113+
},
114+
{
115+
"properties": {
116+
"min_format": {},
117+
"max_format": {}
118+
},
119+
"required": ["min_format", "max_format"]
120+
}
121+
]
68122
},
69123
"features": {
70124
"description": "Section for selecting experimental features.",
@@ -121,18 +175,41 @@
121175
"description": "An overlay.",
122176
"type": "object",
123177
"properties": {
124-
"formats": {
125-
"$ref": "#/definitions/packFormatRange",
126-
"description": "A range of pack formats when this overlay should be active."
127-
},
128178
"directory": {
129179
"description": "The directory to overlay for the respective versions.",
130180
"type": "string",
131181
"pattern": "[a-z0-9_-]+"
182+
},
183+
"min_format": {
184+
"$ref": "#/definitions/packFormatMajorMinor",
185+
"description": "Describes the minimum pack format version to which this overlay applies. As integer or one or two element integer array."
186+
},
187+
"max_format": {
188+
"$ref": "#/definitions/packFormatMajorMinor",
189+
"description": "Describes the minimum pack format version to which this overlay applies. As integer or one or two element integer array."
190+
},
191+
"formats": {
192+
"$ref": "#/definitions/packFormatRange",
193+
"description": "DEPRECATED. A range of major pack format versions to which this overlay applies. Has to match the major versions specified in min_format and max_format.\nRequired when the pack declares support for versions either below data pack format 82 or resource pack format 65.\nMust be absent otherwise."
132194
}
133195
},
134196
"additionalProperties": false,
135-
"required": ["formats", "directory"]
197+
"required": ["directory"],
198+
"anyOf": [
199+
{
200+
"properties": {
201+
"formats": {}
202+
},
203+
"required": ["formats"]
204+
},
205+
{
206+
"properties": {
207+
"min_format": {},
208+
"max_format": {}
209+
},
210+
"required": ["min_format", "max_format"]
211+
}
212+
]
136213
}
137214
}
138215
},

0 commit comments

Comments
 (0)