|
8 | 8 | "description": "https://minecraft.wiki/w/Pack_format", |
9 | 9 | "type": "integer", |
10 | 10 | "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 | + ] |
12 | 32 | }, |
13 | 33 | "packFormatRange": { |
14 | 34 | "anyOf": [ |
|
38 | 58 | } |
39 | 59 | ] |
40 | 60 | }, |
| 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 | + }, |
41 | 72 | "resourceLocation": { |
42 | 73 | "description": "An identifier of a game object\nhttps://minecraft.wiki/w/Resource_location", |
43 | 74 | "type": "string", |
|
50 | 81 | "type": "object", |
51 | 82 | "properties": { |
52 | 83 | "description": { |
| 84 | + "$ref": "#/definitions/textComponent", |
53 | 85 | "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." |
56 | 87 | }, |
57 | 88 | "pack_format": { |
58 | 89 | "$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])." |
60 | 99 | }, |
61 | 100 | "supported_formats": { |
62 | 101 | "$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." |
64 | 103 | } |
65 | 104 | }, |
66 | 105 | "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 | + ] |
68 | 122 | }, |
69 | 123 | "features": { |
70 | 124 | "description": "Section for selecting experimental features.", |
|
121 | 175 | "description": "An overlay.", |
122 | 176 | "type": "object", |
123 | 177 | "properties": { |
124 | | - "formats": { |
125 | | - "$ref": "#/definitions/packFormatRange", |
126 | | - "description": "A range of pack formats when this overlay should be active." |
127 | | - }, |
128 | 178 | "directory": { |
129 | 179 | "description": "The directory to overlay for the respective versions.", |
130 | 180 | "type": "string", |
131 | 181 | "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." |
132 | 194 | } |
133 | 195 | }, |
134 | 196 | "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 | + ] |
136 | 213 | } |
137 | 214 | } |
138 | 215 | }, |
|
0 commit comments