@spyglassmc/java-edition 0.3.13 → 0.3.14

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/index.js CHANGED
@@ -150,6 +150,6 @@ export const initialize = async (ctx) => {
150
150
  jeJson.initialize(ctx);
151
151
  jeMcf.initialize(ctx, summary.commands, release);
152
152
  nbt.initialize(ctx);
153
- return { loadedVersion: release };
153
+ return { loadedVersion: release, errorSource: release };
154
154
  };
155
155
  //# sourceMappingURL=index.js.map
@@ -4,7 +4,7 @@ import { localize } from '@spyglassmc/locales';
4
4
  import * as mcdoc from '@spyglassmc/mcdoc';
5
5
  import * as mcf from '@spyglassmc/mcfunction';
6
6
  import { getItemSlotsArgumentValues } from './common/index.js';
7
- import { EntitySelectorAtVariable, EntitySelectorNode, ScoreHolderNode } from './node/argument.js';
7
+ import { BlockNode, EntitySelectorAtVariable, EntitySelectorNode, ScoreHolderNode, } from './node/argument.js';
8
8
  import * as parser from './parser/index.js';
9
9
  const validator = mcdoc.runtime.attribute.validator;
10
10
  const commandValidator = validator.alternatives(validator.tree({
@@ -60,6 +60,10 @@ export function registerMcdocAttributes(meta, rootTreeNode) {
60
60
  stringParser: () => parser.tag('definition'), // TODO: make this a config
61
61
  stringMocker: (_, __, ctx) => core.SymbolNode.mock(ctx.offset, { category: 'tag' }),
62
62
  });
63
+ mcdoc.runtime.registerAttribute(meta, 'block_predicate', () => undefined, {
64
+ stringParser: () => parser.blockPredicate,
65
+ stringMocker: (_, __, ctx) => BlockNode.mock(ctx.offset, true),
66
+ });
63
67
  mcdoc.runtime.registerAttribute(meta, 'entity', entityValidator, {
64
68
  stringParser: (config) => makeInfallible(parser.entity(config.amount, config.type), localize('selector')),
65
69
  stringMocker: (_, __, ctx) => EntitySelectorNode.mock(ctx.offset, {
@@ -286,6 +286,8 @@ export var ObjectiveCriteriaNode;
286
286
  'totalKillCount',
287
287
  'trigger',
288
288
  'xp',
289
+ ...core.Color.ColorNames.map((n) => `killedByTeam.${n}`),
290
+ ...core.Color.ColorNames.map((n) => `teamkill.${n}`),
289
291
  ];
290
292
  ObjectiveCriteriaNode.ComplexCategories = new Map([
291
293
  ['broken', 'item'],
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@spyglassmc/java-edition",
3
- "version": "0.3.13",
3
+ "version": "0.3.14",
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.10",
21
- "@spyglassmc/json": "0.3.12",
20
+ "@spyglassmc/core": "0.4.11",
21
+ "@spyglassmc/json": "0.3.13",
22
22
  "@spyglassmc/locales": "0.3.8",
23
- "@spyglassmc/mcfunction": "0.2.12",
24
- "@spyglassmc/mcdoc": "0.3.13",
25
- "@spyglassmc/nbt": "0.3.13"
23
+ "@spyglassmc/mcfunction": "0.2.13",
24
+ "@spyglassmc/mcdoc": "0.3.14",
25
+ "@spyglassmc/nbt": "0.3.14"
26
26
  },
27
27
  "devDependencies": {
28
28
  "fast-glob": "^3.2.5"