diff --git a/__snapshots__/packages/java-edition/test-out/mcfunction/parser/argument/minecraftObjectiveCriteria.spec.js b/__snapshots__/packages/java-edition/test-out/mcfunction/parser/argument/minecraftObjectiveCriteria.spec.js index c2218e13b..90e3c4e04 100644 --- a/__snapshots__/packages/java-edition/test-out/mcfunction/parser/argument/minecraftObjectiveCriteria.spec.js +++ b/__snapshots__/packages/java-edition/test-out/mcfunction/parser/argument/minecraftObjectiveCriteria.spec.js @@ -45,6 +45,18 @@ exports['mcfunction argument minecraft:objective_criteria Parse "minecraft.used: "errors": [] } +exports['mcfunction argument minecraft:objective_criteria Parse "teamkill.aqua" 1'] = { + "node": { + "type": "mcfunction:objective_criteria", + "range": { + "start": 0, + "end": 13 + }, + "simpleValue": "teamkill.aqua" + }, + "errors": [] +} + exports['mcfunction argument minecraft:objective_criteria Parse "used:spyglass" 1'] = { "node": { "type": "mcfunction:objective_criteria", diff --git a/packages/java-edition/src/mcfunction/node/argument.ts b/packages/java-edition/src/mcfunction/node/argument.ts index 18a3a6b07..fb9020267 100644 --- a/packages/java-edition/src/mcfunction/node/argument.ts +++ b/packages/java-edition/src/mcfunction/node/argument.ts @@ -452,6 +452,8 @@ export namespace ObjectiveCriteriaNode { 'totalKillCount', 'trigger', 'xp', + ...core.Color.ColorNames.map((n) => `killedByTeam.${n}`), + ...core.Color.ColorNames.map((n) => `teamkill.${n}`), ] export const ComplexCategories = new Map([ ['broken', 'item'], diff --git a/packages/java-edition/test/mcfunction/parser/argument.spec.ts b/packages/java-edition/test/mcfunction/parser/argument.spec.ts index 8d5d5453b..37573c820 100644 --- a/packages/java-edition/test/mcfunction/parser/argument.spec.ts +++ b/packages/java-edition/test/mcfunction/parser/argument.spec.ts @@ -114,7 +114,7 @@ const Suites: Partial< 'minecraft:nbt_tag': [{ content: ['0', '0b', '0l', '0.0', '"foo"', '{foo:bar}'] }], 'minecraft:objective': [{ content: ['foo', '012'] }], 'minecraft:objective_criteria': [{ - content: ['dummy', 'used:spyglass', 'minecraft.used:minecraft.spyglass'], + content: ['dummy', 'used:spyglass', 'minecraft.used:minecraft.spyglass', 'teamkill.aqua'], }], 'minecraft:operation': [{ content: ['=', '>', '<'] }], 'minecraft:particle': [{