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

Resolved text components cannot be entered into macros in some cases

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Unresolved
    • None
    • 25w04a
    • None
    • Unconfirmed
    • (Unassigned)

      It is very common for text components containing multiple "extra" components to contain a homogenous list of strings and compounds. This gets stored as a list of compounds, some of which contain empty keys (as is how NBT handles lists like this). This structure however is not accepted by SNBT normally.

      This, in some situations, can make it impossible to enter already-resolved text components into commands that expect a text component input written in SNBT, because the empty keys cannot be parsed.

      This relates to MC-274632 and MC-279844 also. I believe this to be a distinct issue from MC-274632 as it pertains specifically to broken functionality with text components in the latest snapshots.

      Steps to Reproduce

      1. Download the attached data pack and create a world or server in 25w04a with it enabled
      2. Run this command to resolve a text component and save it in storage:
        function mc-279845:run
      3. Run this command to attempt to display that text component in chat, and observe the error message:
        function mc-279845:macro with storage mc-279845:main {}

      Observed Result:

      The second function fails, pointing to the empty key as the culprit.

      Expected Result:

      The text component should be inserted into the command in a parseable way so that it can be displayed.

            Unassigned Unassigned
            Deoxyribonucleic Evans DorkOrc
            Votes:
            4 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated: