From 2de5efc5dbc61a51bb916df235c593b9e4c1310b Mon Sep 17 00:00:00 2001 From: Misode Date: Fri, 22 Nov 2024 02:55:57 +0100 Subject: [PATCH] =?UTF-8?q?=F0=9F=90=9B=20Always=20delcare=20tag=20symbols?= =?UTF-8?q?=20as=20references=20(#1648)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- packages/core/src/service/Config.ts | 4 ++++ packages/java-edition/src/mcfunction/mcdocAttributes.ts | 2 +- packages/java-edition/src/mcfunction/tree/patch.ts | 3 --- 3 files changed, 5 insertions(+), 4 deletions(-) diff --git a/packages/core/src/service/Config.ts b/packages/core/src/service/Config.ts index 7362b280b..1a1ae6689 100644 --- a/packages/core/src/service/Config.ts +++ b/packages/core/src/service/Config.ts @@ -425,6 +425,10 @@ export const VanillaConfig: Config = { ], then: { report: 'warning' }, }, + { + if: { category: ['attribute_modifier', 'attribute_modifier_uuid', 'tag'] }, + then: { declare: 'public' }, + }, { then: { declare: 'block' }, }, diff --git a/packages/java-edition/src/mcfunction/mcdocAttributes.ts b/packages/java-edition/src/mcfunction/mcdocAttributes.ts index 15d9da0a0..382671e9e 100644 --- a/packages/java-edition/src/mcfunction/mcdocAttributes.ts +++ b/packages/java-edition/src/mcfunction/mcdocAttributes.ts @@ -93,7 +93,7 @@ export function registerMcdocAttributes(meta: core.MetaRegistry, rootTreeNode: m stringMocker: (_, __, ctx) => ScoreHolderNode.mock(ctx.offset), }) mcdoc.runtime.registerAttribute(meta, 'tag', () => undefined, { - stringParser: () => parser.tag('definition'), // TODO: make this a config + stringParser: () => parser.tag('reference'), stringMocker: (_, __, ctx) => core.SymbolNode.mock(ctx.offset, { category: 'tag' }), }) mcdoc.runtime.registerAttribute(meta, 'block_predicate', () => undefined, { diff --git a/packages/java-edition/src/mcfunction/tree/patch.ts b/packages/java-edition/src/mcfunction/tree/patch.ts index 09bb5b8e9..f77cb7c69 100644 --- a/packages/java-edition/src/mcfunction/tree/patch.ts +++ b/packages/java-edition/src/mcfunction/tree/patch.ts @@ -644,9 +644,6 @@ export function getPatch(release: ReleaseVersion): PartialRootTreeNode { children: { name: { parser: 'spyglassmc:tag', - properties: { - usageType: 'definition', - }, }, }, },