@spyglassmc/nbt 0.3.26 → 0.3.28
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/parser/collection.js +7 -3
- package/package.json +3 -3
package/lib/parser/collection.js
CHANGED
|
@@ -16,9 +16,13 @@ export const list = (src, ctx) => {
|
|
|
16
16
|
ans.valueType = ans.children[0]?.value?.type;
|
|
17
17
|
// Check if every element is of the same type.
|
|
18
18
|
if (ans.valueType) {
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
19
|
+
// TODO: don't have this inline java-edition version check
|
|
20
|
+
const release = ctx.project['loadedVersion'];
|
|
21
|
+
if (release && Number(release.slice(2)) < Number('1.21.5'.slice(2))) {
|
|
22
|
+
for (const { value } of ans.children) {
|
|
23
|
+
if (value && value.type !== ans.valueType) {
|
|
24
|
+
ctx.err.report(localize('expected-got', localizeTag(ans.valueType), localizeTag(value.type)), value);
|
|
25
|
+
}
|
|
22
26
|
}
|
|
23
27
|
}
|
|
24
28
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@spyglassmc/nbt",
|
|
3
|
-
"version": "0.3.
|
|
3
|
+
"version": "0.3.28",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"main": "lib/index.js",
|
|
6
6
|
"types": "lib/index.d.ts",
|
|
@@ -25,8 +25,8 @@
|
|
|
25
25
|
"url": "https://github.com/SpyglassMC/Spyglass/issues"
|
|
26
26
|
},
|
|
27
27
|
"dependencies": {
|
|
28
|
-
"@spyglassmc/core": "0.4.
|
|
28
|
+
"@spyglassmc/core": "0.4.24",
|
|
29
29
|
"@spyglassmc/locales": "0.3.12",
|
|
30
|
-
"@spyglassmc/mcdoc": "0.3.
|
|
30
|
+
"@spyglassmc/mcdoc": "0.3.28"
|
|
31
31
|
}
|
|
32
32
|
}
|