Uploaded image for project: 'Minecraft: Java Edition'
  1. Minecraft: Java Edition
  2. MC-276168

Macro key cannot utilize colons

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Invalid
    • None
    • 1.21.1
    • None
    • Community Consensus
    • Creative
    • Commands, Data Packs

      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.

       

        1. image-2024-09-03-18-34-49-036.png
          1 kB
          BugTracker

            Unassigned Unassigned
            JustBeginner JustBeginner
            Votes:
            1 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved:
              CHK: