@spyglassmc/java-edition 0.3.0 → 0.3.2

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.
Files changed (40) hide show
  1. package/lib/binder/index.d.ts +1 -1
  2. package/lib/binder/index.js +94 -19
  3. package/lib/common/index.js +10 -7
  4. package/lib/dependency/index.d.ts +1 -3
  5. package/lib/dependency/index.js +29 -21
  6. package/lib/dependency/mcmeta.d.ts +1 -1
  7. package/lib/dependency/mcmeta.js +27 -13
  8. package/lib/index.js +16 -7
  9. package/lib/json/checker/data/advancement.js +24 -13
  10. package/lib/json/checker/data/biome.js +3 -3
  11. package/lib/json/checker/data/common.js +15 -27
  12. package/lib/json/checker/data/dimension.js +7 -18
  13. package/lib/json/checker/data/feature.js +41 -27
  14. package/lib/json/checker/data/index.d.ts +1 -1
  15. package/lib/json/checker/data/index.js +3 -3
  16. package/lib/json/checker/data/loot_table.js +16 -17
  17. package/lib/json/checker/data/recipe.js +1 -1
  18. package/lib/json/checker/data/structure.js +20 -12
  19. package/lib/json/checker/data/tag.js +2 -2
  20. package/lib/json/checker/data/text_component.js +21 -12
  21. package/lib/json/checker/index.d.ts +10 -3
  22. package/lib/json/checker/index.js +230 -3
  23. package/lib/json/checker/util/advancement.js +3 -3
  24. package/lib/json/checker/util/block_states.d.ts +2 -2
  25. package/lib/json/checker/util/block_states.js +7 -5
  26. package/lib/json/checker/util/color.js +8 -2
  27. package/lib/json/checker/util/nbt.js +3 -2
  28. package/lib/json/checker/util/recipe.js +7 -6
  29. package/lib/json/checker/util/version.js +2 -2
  30. package/lib/mcfunction/checker/index.js +10 -7
  31. package/lib/mcfunction/colorizer/index.js +2 -4
  32. package/lib/mcfunction/common/index.js +46 -15
  33. package/lib/mcfunction/completer/argument.js +53 -24
  34. package/lib/mcfunction/inlayHintProvider.js +8 -3
  35. package/lib/mcfunction/node/argument.d.ts +3 -3
  36. package/lib/mcfunction/node/argument.js +57 -17
  37. package/lib/mcfunction/parser/argument.js +124 -52
  38. package/lib/mcfunction/signatureHelpProvider.js +6 -3
  39. package/lib/mcfunction/tree/patch.js +132 -126
  40. 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
- attribute: {
13
- children: {
14
- target: {
15
- children: {
16
- attribute: {
17
- properties: {
18
- category: 'attribute',
19
- },
20
- children: {
21
- modifier: {
22
- children: {
23
- add: {
24
- children: {
25
- uuid: {
26
- properties: {
27
- category: 'attribute_modifier_uuid',
28
- usageType: 'definition',
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
- remove: {
34
- children: {
35
- uuid: {
36
- properties: {
37
- category: 'attribute_modifier_uuid',
34
+ remove: {
35
+ children: {
36
+ uuid: {
37
+ properties: {
38
+ category: 'attribute_modifier_uuid',
39
+ },
38
40
  },
39
41
  },
40
42
  },
41
- },
42
- value: {
43
- children: {
44
- get: {
45
- children: {
46
- uuid: {
47
- properties: {
48
- category: 'attribute_modifier_uuid',
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
- item: {
177
- children: {
178
- replace: {
179
- children: {
180
- block: {
181
- children: {
182
- pos: {
183
- children: {
184
- slot: {
185
- children: {
186
- from: {
187
- children: {
188
- block: {
189
- children: {
190
- source: {
191
- children: {
192
- sourceSlot: {
193
- children: {
194
- modifier: {
195
- properties: {
196
- category: 'item_modifier',
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
- entity: {
206
- children: {
207
- source: {
208
- children: {
209
- sourceSlot: {
210
- children: {
211
- modifier: {
212
- properties: {
213
- category: 'item_modifier',
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
- entity: {
231
- children: {
232
- targets: {
233
- children: {
234
- slot: {
235
- children: {
236
- from: {
237
- children: {
238
- block: {
239
- children: {
240
- source: {
241
- children: {
242
- sourceSlot: {
243
- children: {
244
- modifier: {
245
- properties: {
246
- category: 'item_modifier',
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
- entity: {
256
- children: {
257
- source: {
258
- children: {
259
- sourceSlot: {
260
- children: {
261
- modifier: {
262
- properties: {
263
- category: 'item_modifier',
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
- modify: {
283
- children: {
284
- block: {
285
- children: {
286
- pos: {
287
- children: {
288
- slot: {
289
- children: {
290
- modifier: {
291
- properties: {
292
- category: 'item_modifier',
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
- entity: {
302
- children: {
303
- targets: {
304
- children: {
305
- slot: {
306
- children: {
307
- modifier: {
308
- properties: {
309
- category: 'item_modifier',
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
- locatebiome: {
334
- children: {
335
- biome: {
336
- properties: {
337
- category: 'worldgen/biome',
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.0",
3
+ "version": "0.3.2",
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.3.0",
21
- "@spyglassmc/json": "0.3.0",
22
- "@spyglassmc/locales": "0.3.0",
23
- "@spyglassmc/mcfunction": "0.2.1",
24
- "@spyglassmc/mcdoc": "0.3.0",
25
- "@spyglassmc/nbt": "0.3.0"
20
+ "@spyglassmc/core": "0.4.1",
21
+ "@spyglassmc/json": "0.3.2",
22
+ "@spyglassmc/locales": "0.3.1",
23
+ "@spyglassmc/mcfunction": "0.2.3",
24
+ "@spyglassmc/mcdoc": "0.3.2",
25
+ "@spyglassmc/nbt": "0.3.2"
26
26
  },
27
27
  "devDependencies": {
28
28
  "fast-glob": "^3.2.5",