Skip to content

Commit 9db6f37

Browse files
Update minecraft-pack-mcmeta.json to match the actual current schema (SchemaStore#4850)
* Update minecraft-pack-mcmeta.json to match the actual current schema * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci --------- Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
1 parent 4453df7 commit 9db6f37

File tree

1 file changed

+139
-21
lines changed

1 file changed

+139
-21
lines changed

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

Lines changed: 139 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -2,53 +2,171 @@
22
"$schema": "http://json-schema.org/draft-07/schema#",
33
"$id": "https://json.schemastore.org/minecraft-pack-mcmeta.json",
44
"additionalProperties": false,
5-
"description": "Minecraft Resource/Data Pack Metadata\nhttps://minecraft.wiki/w/Resource_pack\nhttps://minecraft.wiki/w/Data_pack",
5+
"description": "Minecraft Resource/Data Pack Metadata\nhttps://minecraft.wiki/w/Pack.mcmeta#Format",
6+
"definitions": {
7+
"packFormat": {
8+
"description": "https://minecraft.wiki/w/Pack_format",
9+
"type": "integer",
10+
"minimum": 1,
11+
"maximum": 81
12+
},
13+
"packFormatRange": {
14+
"anyOf": [
15+
{
16+
"type": "array",
17+
"minItems": 2,
18+
"maxItems": 2,
19+
"items": {
20+
"$ref": "#/definitions/packFormat"
21+
}
22+
},
23+
{
24+
"$ref": "#/definitions/packFormat"
25+
},
26+
{
27+
"type": "object",
28+
"properties": {
29+
"min_inclusive": {
30+
"$ref": "#/definitions/packFormat"
31+
},
32+
"max_inclusive": {
33+
"$ref": "#/definitions/packFormat"
34+
}
35+
},
36+
"additionalProperties": false,
37+
"required": ["min_inclusive", "max_inclusive"]
38+
}
39+
]
40+
},
41+
"resourceLocation": {
42+
"description": "An identifier of a game object\nhttps://minecraft.wiki/w/Resource_location",
43+
"type": "string",
44+
"pattern": "(?:([a-z0-9_\\-.]+:)?|:)[a-z0-9_\\-./]+"
45+
}
46+
},
647
"properties": {
748
"pack": {
8-
"title": "pack options",
9-
"description": "Options for the current pack\nhttps://minecraft.wiki/w/Data_pack#Contents",
49+
"description": "Holds the pack information.",
1050
"type": "object",
1151
"properties": {
1252
"description": {
1353
"title": "description",
14-
"description": "A description for the current pack\nhttps://minecraft.wiki/w/Data_pack#Contents"
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"
1556
},
1657
"pack_format": {
17-
"description": "A version for the current pack\nhttps://minecraft.wiki/w/Data_pack#Contents",
18-
"type": "integer",
19-
"minimum": 1,
20-
"maximum": 48,
21-
"default": 4
58+
"$ref": "#/definitions/packFormat",
59+
"description": "Determines the version(s) of Minecraft that this pack is compatible with."
60+
},
61+
"supported_formats": {
62+
"$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`."
2264
}
2365
},
24-
"additionalProperties": false
66+
"additionalProperties": false,
67+
"required": ["description", "pack_format"]
68+
},
69+
"features": {
70+
"description": "Section for selecting experimental features.",
71+
"type": "object",
72+
"properties": {
73+
"enabled": {
74+
"description": "List of enabled feature flags.",
75+
"type": "array",
76+
"items": {
77+
"$ref": "#/definitions/resourceLocation",
78+
"description": "Resource location of a feature flag."
79+
}
80+
}
81+
},
82+
"additionalProperties": true,
83+
"required": ["enabled"]
2584
},
2685
"filter": {
27-
"title": "filter options",
28-
"description": "Filter options for the current pack\nhttps://minecraft.wiki/w/Data_pack",
86+
"description": "Section for filtering out files from packs applied below this one. Any file that matches one of the blocked patterns is treated as if it was not present in the pack at all.",
87+
"type": "object",
88+
"properties": {
89+
"block": {
90+
"type": "array",
91+
"items": {
92+
"type": "object",
93+
"properties": {
94+
"namespace": {
95+
"description": "A regular expression for the namespace of files to be filtered out. If unspecified, it applies to every namespace.",
96+
"type": "string",
97+
"format": "regex",
98+
"default": "[a-z0-9_\\-.]+"
99+
},
100+
"path": {
101+
"description": "A regular expression for the paths of files to be filtered out. If unspecified, it applies to every file.",
102+
"type": "string",
103+
"format": "regex",
104+
"default": "[a-z0-9_\\-./]+"
105+
}
106+
},
107+
"additionalProperties": false
108+
}
109+
}
110+
},
111+
"additionalProperties": false
112+
},
113+
"overlays": {
114+
"description": "Section for specifying the overlays, which are sub-packs applied over the \"normal\" contents of a pack. Their directories have their own assets and data directories, and are placed in the pack's root directory.",
115+
"type": "object",
116+
"properties": {
117+
"entries": {
118+
"description": "List of overlays. The order is important, as the first in the list is applied first.",
119+
"type": "array",
120+
"items": {
121+
"description": "An overlay.",
122+
"type": "object",
123+
"properties": {
124+
"formats": {
125+
"$ref": "#/definitions/packFormatRange",
126+
"description": "A range of pack formats when this overlay should be active."
127+
},
128+
"overlay": {
129+
"description": "The directory to overlay for the respective versions.",
130+
"type": "string",
131+
"pattern": "[a-z0-9_-]+"
132+
}
133+
},
134+
"additionalProperties": false,
135+
"required": ["formats", "overlay"]
136+
}
137+
}
138+
},
139+
"additionalProperties": false,
140+
"required": ["entries"]
141+
},
142+
"language": {
143+
"description": "Contains additional languages to add to the language menu. Only present in resource packs.",
29144
"type": "object",
30145
"additionalProperties": {
31-
"title": "pattern",
32-
"description": "A pattern for the current pack\nhttps://minecraft.wiki/w/Data_pack",
33146
"type": "object",
34147
"properties": {
35-
"namespace": {
36-
"description": "A namespace regular expression for the current pack\nhttps://minecraft.wiki/w/Data_pack",
148+
"name": {
149+
"description": "The full name of the language",
37150
"type": "string"
38151
},
39-
"path": {
40-
"description": "A path regular expression for the current pack\nhttps://minecraft.wiki/w/Data_pack",
152+
"region": {
153+
"description": "The country or region name",
41154
"type": "string"
155+
},
156+
"bidirectional": {
157+
"description": "If true, the language reads right to left.",
158+
"type": "boolean"
42159
}
43160
},
44-
"additionalProperties": false
161+
"additionalProperties": false,
162+
"required": ["name", "region"]
45163
}
46164
},
47165
"fusion": {
48166
"$comment": "Fusion properties for Minecraft resource packs",
49167
"$ref": "https://json.schemastore.org/partial-fusion-pack-metadata.json#/definitions/fusion-properties"
50168
}
51169
},
52-
"title": "pack metadata",
53-
"type": "object"
170+
"type": "object",
171+
"required": ["pack"]
54172
}

0 commit comments

Comments
 (0)