mojira.dev
MC-276168

Macro key cannot utilize colons

Macros Key Cannot Utilize Colons.

This means /function can't with an item component.

 

Valid SNBT key is not valid in a macro.

 

To reproduce

Create a new test.mcfunction, enter a command:

$say $(minecraft:custom_name)

Rename any item to foo with an anvil and hold it.

Execute in chat:

/function test:test with entity @s SelectedItem.components

 

Expected to happen:

Game Output: "foo"

 

Actually happen:

Game Output: Unknown function test:test

 
Even if the key is put in quotation marks (test2.mcfunction):

$say $("minecraft:custom_name")

The issue persists.

 

Attachments

Comments 3

Please attach a datapack that can be used to reproduce the issue

Can confirm in 24w35a:

[media]

Thank you for your report!
After consideration, the issue is being closed as Invalid.

You have posted a feature request or a suggestion. This site is for bug reports only.
For suggestions, please visit The official Minecraft feedback site or visit the Minecraft Feedback Discord server.

Quick Links:
📓 Bug Tracker Guidelines – 💬 Community Support – 📧 Mojang Support (Technical Issues) – 📧 Microsoft Support (Account Issues)
📓 Project Summary – ✍️ Feedback and Suggestions – 📖 Game Wiki

JustBeginner

(Unassigned)

Community Consensus

Commands, Data Packs

1.21.1

Retrieved