@spyglassmc/java-edition 0.3.1 → 0.3.3
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/binder/index.d.ts +1 -1
- package/lib/binder/index.js +110 -19
- package/lib/common/index.js +10 -7
- package/lib/dependency/common.d.ts +1 -1
- package/lib/dependency/index.js +11 -9
- package/lib/dependency/mcmeta.d.ts +4 -4
- package/lib/dependency/mcmeta.js +32 -15
- package/lib/index.js +18 -6
- package/lib/json/checker/data/advancement.js +24 -13
- package/lib/json/checker/data/biome.js +3 -3
- package/lib/json/checker/data/common.js +29 -30
- package/lib/json/checker/data/dimension.js +7 -18
- package/lib/json/checker/data/feature.js +45 -27
- package/lib/json/checker/data/index.d.ts +1 -1
- package/lib/json/checker/data/index.js +3 -3
- package/lib/json/checker/data/loot_table.js +40 -21
- package/lib/json/checker/data/recipe.js +1 -1
- package/lib/json/checker/data/structure.js +24 -14
- package/lib/json/checker/data/tag.js +2 -2
- package/lib/json/checker/data/text_component.js +24 -8
- package/lib/json/checker/index.d.ts +10 -3
- package/lib/json/checker/index.js +231 -3
- package/lib/json/checker/util/advancement.js +3 -2
- package/lib/json/checker/util/block_states.d.ts +2 -2
- package/lib/json/checker/util/block_states.js +7 -5
- package/lib/json/checker/util/color.js +8 -2
- package/lib/json/checker/util/nbt.d.ts +1 -1
- package/lib/json/checker/util/nbt.js +4 -2
- package/lib/json/checker/util/recipe.js +7 -6
- package/lib/json/checker/util/version.d.ts +1 -1
- package/lib/json/checker/util/version.js +2 -2
- package/lib/mcfunction/checker/index.js +14 -11
- package/lib/mcfunction/colorizer/index.js +2 -4
- package/lib/mcfunction/common/index.js +46 -15
- package/lib/mcfunction/completer/argument.js +53 -24
- package/lib/mcfunction/index.js +13 -1
- package/lib/mcfunction/inlayHintProvider.js +8 -3
- package/lib/mcfunction/node/argument.d.ts +6 -6
- package/lib/mcfunction/node/argument.js +57 -17
- package/lib/mcfunction/parser/argument.js +158 -63
- package/lib/mcfunction/signatureHelpProvider.js +9 -4
- package/lib/mcfunction/tree/argument.d.ts +1 -1
- package/lib/mcfunction/tree/patch.js +132 -126
- package/package.json +7 -7
|
@@ -8,44 +8,46 @@ export function getPatch(release) {
|
|
|
8
8
|
revoke: AdvancementTargets,
|
|
9
9
|
},
|
|
10
10
|
},
|
|
11
|
-
...ReleaseVersion.cmp(release, '1.16') >= 0
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
11
|
+
...(ReleaseVersion.cmp(release, '1.16') >= 0
|
|
12
|
+
? {
|
|
13
|
+
attribute: {
|
|
14
|
+
children: {
|
|
15
|
+
target: {
|
|
16
|
+
children: {
|
|
17
|
+
attribute: {
|
|
18
|
+
properties: {
|
|
19
|
+
category: 'attribute',
|
|
20
|
+
},
|
|
21
|
+
children: {
|
|
22
|
+
modifier: {
|
|
23
|
+
children: {
|
|
24
|
+
add: {
|
|
25
|
+
children: {
|
|
26
|
+
uuid: {
|
|
27
|
+
properties: {
|
|
28
|
+
category: 'attribute_modifier_uuid',
|
|
29
|
+
usageType: 'definition',
|
|
30
|
+
},
|
|
29
31
|
},
|
|
30
32
|
},
|
|
31
33
|
},
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
34
|
+
remove: {
|
|
35
|
+
children: {
|
|
36
|
+
uuid: {
|
|
37
|
+
properties: {
|
|
38
|
+
category: 'attribute_modifier_uuid',
|
|
39
|
+
},
|
|
38
40
|
},
|
|
39
41
|
},
|
|
40
42
|
},
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
43
|
+
value: {
|
|
44
|
+
children: {
|
|
45
|
+
get: {
|
|
46
|
+
children: {
|
|
47
|
+
uuid: {
|
|
48
|
+
properties: {
|
|
49
|
+
category: 'attribute_modifier_uuid',
|
|
50
|
+
},
|
|
49
51
|
},
|
|
50
52
|
},
|
|
51
53
|
},
|
|
@@ -59,8 +61,8 @@ export function getPatch(release) {
|
|
|
59
61
|
},
|
|
60
62
|
},
|
|
61
63
|
},
|
|
62
|
-
}
|
|
63
|
-
|
|
64
|
+
}
|
|
65
|
+
: {}),
|
|
64
66
|
ban: {
|
|
65
67
|
permission: 3,
|
|
66
68
|
},
|
|
@@ -172,28 +174,30 @@ export function getPatch(release) {
|
|
|
172
174
|
unless: ExecuteCondition,
|
|
173
175
|
},
|
|
174
176
|
},
|
|
175
|
-
...ReleaseVersion.cmp(release, '1.17') >= 0
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
177
|
+
...(ReleaseVersion.cmp(release, '1.17') >= 0
|
|
178
|
+
? {
|
|
179
|
+
item: {
|
|
180
|
+
children: {
|
|
181
|
+
replace: {
|
|
182
|
+
children: {
|
|
183
|
+
block: {
|
|
184
|
+
children: {
|
|
185
|
+
pos: {
|
|
186
|
+
children: {
|
|
187
|
+
slot: {
|
|
188
|
+
children: {
|
|
189
|
+
from: {
|
|
190
|
+
children: {
|
|
191
|
+
block: {
|
|
192
|
+
children: {
|
|
193
|
+
source: {
|
|
194
|
+
children: {
|
|
195
|
+
sourceSlot: {
|
|
196
|
+
children: {
|
|
197
|
+
modifier: {
|
|
198
|
+
properties: {
|
|
199
|
+
category: 'item_modifier',
|
|
200
|
+
},
|
|
197
201
|
},
|
|
198
202
|
},
|
|
199
203
|
},
|
|
@@ -201,16 +205,16 @@ export function getPatch(release) {
|
|
|
201
205
|
},
|
|
202
206
|
},
|
|
203
207
|
},
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
208
|
+
entity: {
|
|
209
|
+
children: {
|
|
210
|
+
source: {
|
|
211
|
+
children: {
|
|
212
|
+
sourceSlot: {
|
|
213
|
+
children: {
|
|
214
|
+
modifier: {
|
|
215
|
+
properties: {
|
|
216
|
+
category: 'item_modifier',
|
|
217
|
+
},
|
|
214
218
|
},
|
|
215
219
|
},
|
|
216
220
|
},
|
|
@@ -226,24 +230,24 @@ export function getPatch(release) {
|
|
|
226
230
|
},
|
|
227
231
|
},
|
|
228
232
|
},
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
233
|
+
entity: {
|
|
234
|
+
children: {
|
|
235
|
+
targets: {
|
|
236
|
+
children: {
|
|
237
|
+
slot: {
|
|
238
|
+
children: {
|
|
239
|
+
from: {
|
|
240
|
+
children: {
|
|
241
|
+
block: {
|
|
242
|
+
children: {
|
|
243
|
+
source: {
|
|
244
|
+
children: {
|
|
245
|
+
sourceSlot: {
|
|
246
|
+
children: {
|
|
247
|
+
modifier: {
|
|
248
|
+
properties: {
|
|
249
|
+
category: 'item_modifier',
|
|
250
|
+
},
|
|
247
251
|
},
|
|
248
252
|
},
|
|
249
253
|
},
|
|
@@ -251,16 +255,16 @@ export function getPatch(release) {
|
|
|
251
255
|
},
|
|
252
256
|
},
|
|
253
257
|
},
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
258
|
+
entity: {
|
|
259
|
+
children: {
|
|
260
|
+
source: {
|
|
261
|
+
children: {
|
|
262
|
+
sourceSlot: {
|
|
263
|
+
children: {
|
|
264
|
+
modifier: {
|
|
265
|
+
properties: {
|
|
266
|
+
category: 'item_modifier',
|
|
267
|
+
},
|
|
264
268
|
},
|
|
265
269
|
},
|
|
266
270
|
},
|
|
@@ -278,18 +282,18 @@ export function getPatch(release) {
|
|
|
278
282
|
},
|
|
279
283
|
},
|
|
280
284
|
},
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
285
|
+
modify: {
|
|
286
|
+
children: {
|
|
287
|
+
block: {
|
|
288
|
+
children: {
|
|
289
|
+
pos: {
|
|
290
|
+
children: {
|
|
291
|
+
slot: {
|
|
292
|
+
children: {
|
|
293
|
+
modifier: {
|
|
294
|
+
properties: {
|
|
295
|
+
category: 'item_modifier',
|
|
296
|
+
},
|
|
293
297
|
},
|
|
294
298
|
},
|
|
295
299
|
},
|
|
@@ -297,16 +301,16 @@ export function getPatch(release) {
|
|
|
297
301
|
},
|
|
298
302
|
},
|
|
299
303
|
},
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
304
|
+
entity: {
|
|
305
|
+
children: {
|
|
306
|
+
targets: {
|
|
307
|
+
children: {
|
|
308
|
+
slot: {
|
|
309
|
+
children: {
|
|
310
|
+
modifier: {
|
|
311
|
+
properties: {
|
|
312
|
+
category: 'item_modifier',
|
|
313
|
+
},
|
|
310
314
|
},
|
|
311
315
|
},
|
|
312
316
|
},
|
|
@@ -318,8 +322,8 @@ export function getPatch(release) {
|
|
|
318
322
|
},
|
|
319
323
|
},
|
|
320
324
|
},
|
|
321
|
-
}
|
|
322
|
-
|
|
325
|
+
}
|
|
326
|
+
: {}),
|
|
323
327
|
help: {
|
|
324
328
|
permission: 0,
|
|
325
329
|
},
|
|
@@ -329,17 +333,19 @@ export function getPatch(release) {
|
|
|
329
333
|
list: {
|
|
330
334
|
permission: 0,
|
|
331
335
|
},
|
|
332
|
-
...ReleaseVersion.cmp(release, '1.16') >= 0
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
336
|
+
...(ReleaseVersion.cmp(release, '1.16') >= 0
|
|
337
|
+
? {
|
|
338
|
+
locatebiome: {
|
|
339
|
+
children: {
|
|
340
|
+
biome: {
|
|
341
|
+
properties: {
|
|
342
|
+
category: 'worldgen/biome',
|
|
343
|
+
},
|
|
338
344
|
},
|
|
339
345
|
},
|
|
340
346
|
},
|
|
341
|
-
}
|
|
342
|
-
|
|
347
|
+
}
|
|
348
|
+
: {}),
|
|
343
349
|
loot: {
|
|
344
350
|
children: {
|
|
345
351
|
give: {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@spyglassmc/java-edition",
|
|
3
|
-
"version": "0.3.
|
|
3
|
+
"version": "0.3.3",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"main": "lib/index.js",
|
|
6
6
|
"types": "lib/index.d.ts",
|
|
@@ -17,12 +17,12 @@
|
|
|
17
17
|
"release:dry": "npm publish --dry-run"
|
|
18
18
|
},
|
|
19
19
|
"dependencies": {
|
|
20
|
-
"@spyglassmc/core": "0.4.
|
|
21
|
-
"@spyglassmc/json": "0.3.
|
|
22
|
-
"@spyglassmc/locales": "0.3.
|
|
23
|
-
"@spyglassmc/mcfunction": "0.2.
|
|
24
|
-
"@spyglassmc/mcdoc": "0.3.
|
|
25
|
-
"@spyglassmc/nbt": "0.3.
|
|
20
|
+
"@spyglassmc/core": "0.4.2",
|
|
21
|
+
"@spyglassmc/json": "0.3.3",
|
|
22
|
+
"@spyglassmc/locales": "0.3.2",
|
|
23
|
+
"@spyglassmc/mcfunction": "0.2.4",
|
|
24
|
+
"@spyglassmc/mcdoc": "0.3.3",
|
|
25
|
+
"@spyglassmc/nbt": "0.3.3"
|
|
26
26
|
},
|
|
27
27
|
"devDependencies": {
|
|
28
28
|
"fast-glob": "^3.2.5",
|