@spyglassmc/nbt 0.3.45 → 0.3.47
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/checker/index.js +4 -4
- package/lib/parser/primitive.js +1 -1
- package/package.json +5 -5
package/lib/checker/index.js
CHANGED
|
@@ -188,23 +188,23 @@ export function blockStates(blocks, _options = {}) {
|
|
|
188
188
|
if (valueNode.type === 'nbt:byte'
|
|
189
189
|
&& (ctx.src.slice(valueNode.range).toLowerCase() === 'false'
|
|
190
190
|
|| ctx.src.slice(valueNode.range).toLowerCase() === 'true')) {
|
|
191
|
-
ctx.err.report(localize('nbt.checker.block-states.fake-boolean'), valueNode,
|
|
191
|
+
ctx.err.report(localize('nbt.checker.block-states.fake-boolean'), valueNode, core.ErrorSeverity.Warning);
|
|
192
192
|
continue;
|
|
193
193
|
}
|
|
194
194
|
else if (valueNode.type !== 'nbt:string' && valueNode.type !== 'nbt:int') {
|
|
195
|
-
ctx.err.report(localize('nbt.checker.block-states.unexpected-value-type'), valueNode,
|
|
195
|
+
ctx.err.report(localize('nbt.checker.block-states.unexpected-value-type'), valueNode, core.ErrorSeverity.Warning);
|
|
196
196
|
continue;
|
|
197
197
|
}
|
|
198
198
|
if (Object.keys(states).includes(keyNode.value)) {
|
|
199
199
|
// The current state exists. Check the value.
|
|
200
200
|
const stateValues = states[keyNode.value];
|
|
201
201
|
if (!stateValues.includes(valueNode.value.toString())) {
|
|
202
|
-
ctx.err.report(localize('expected-got', stateValues, localeQuote(valueNode.value.toString())), valueNode,
|
|
202
|
+
ctx.err.report(localize('expected-got', stateValues, localeQuote(valueNode.value.toString())), valueNode, core.ErrorSeverity.Warning);
|
|
203
203
|
}
|
|
204
204
|
}
|
|
205
205
|
else {
|
|
206
206
|
// The current state doesn't exist.
|
|
207
|
-
ctx.err.report(localize('nbt.checker.block-states.unknown-state', localeQuote(keyNode.value), blocks), keyNode,
|
|
207
|
+
ctx.err.report(localize('nbt.checker.block-states.unknown-state', localeQuote(keyNode.value), blocks), keyNode, core.ErrorSeverity.Warning);
|
|
208
208
|
}
|
|
209
209
|
}
|
|
210
210
|
};
|
package/lib/parser/primitive.js
CHANGED
|
@@ -98,7 +98,7 @@ export const primitive = (src, ctx) => {
|
|
|
98
98
|
: core.float({ pattern: /./, min: e.min, max: e.max, onOutOfRange });
|
|
99
99
|
const { result: numeralResult, updateSrcAndCtx: updateNumeral } = core.attempt(numeralParser, src, ctx);
|
|
100
100
|
if (isOutOfRange) {
|
|
101
|
-
ctx.err.report(localize('nbt.parser.number.out-of-range', localizeTag(e.type), localize('nbt.node.string'), e.min, e.max), unquotedResult,
|
|
101
|
+
ctx.err.report(localize('nbt.parser.number.out-of-range', localizeTag(e.type), localize('nbt.node.string'), e.min, e.max), unquotedResult, core.ErrorSeverity.Warning);
|
|
102
102
|
break;
|
|
103
103
|
}
|
|
104
104
|
updateNumeral();
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@spyglassmc/nbt",
|
|
3
|
-
"version": "0.3.
|
|
3
|
+
"version": "0.3.47",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"main": "lib/index.js",
|
|
6
6
|
"types": "lib/index.d.ts",
|
|
@@ -11,7 +11,7 @@
|
|
|
11
11
|
},
|
|
12
12
|
"scripts": {
|
|
13
13
|
"release": "npm publish",
|
|
14
|
-
"release:dry": "npm publish --dry-run"
|
|
14
|
+
"release:dry": "npm publish --tag latest --dry-run"
|
|
15
15
|
},
|
|
16
16
|
"publishConfig": {
|
|
17
17
|
"access": "public"
|
|
@@ -25,8 +25,8 @@
|
|
|
25
25
|
"url": "https://github.com/SpyglassMC/Spyglass/issues"
|
|
26
26
|
},
|
|
27
27
|
"dependencies": {
|
|
28
|
-
"@spyglassmc/core": "0.4.
|
|
29
|
-
"@spyglassmc/locales": "0.3.
|
|
30
|
-
"@spyglassmc/mcdoc": "0.3.
|
|
28
|
+
"@spyglassmc/core": "0.4.41",
|
|
29
|
+
"@spyglassmc/locales": "0.3.21",
|
|
30
|
+
"@spyglassmc/mcdoc": "0.3.45"
|
|
31
31
|
}
|
|
32
32
|
}
|