mojira.dev
MC-307248

/data modify ... append string produces a list instead of a concatenated string

When you use command

/data modify <targetPath> append string from <sourcePath>

, the <targetPath> will still be appended with selected values instead of string when <sourcePath> selects multiple NBT elements.

  • Steps to reproduce the issue:

    • For example, list in storage “minecraft:test“ is {list:[1,2,3]} and you use the command

      /data modify storage minecraft:test result append string storage minecraft:test list[]

      , you will find that “result“ in storage “minecraft:test“ is like {result:[“1”,”2”,”3”]} instead of {result:”123”}.

  • Expected result:

    • “result“ in storage “minecraft:test“ should be a string formed by concatenating the source values {result:”123”}。

  • Actual result:

    • “result“ in storage “minecraft:test“ becomes a list: {result:[“1”,”2”,”3”]}.

Besides, you Mojang does not support the function of connecting strings, which obstructs datapack developers to easily achieve some simple functions in other coding languages like connecting strings together and storing it or comparing it with other strings.

Environment

Windows 11 25H2, 26200.8039

Attachments

Comments 3

屏幕截图 2026-04-06 000236.png

Here is the exact behavior in game.

屏幕截图 2026-04-06 000730.png

Sorry I sent the wrong screenshot.

This is a feature request

high1145

(Unassigned)

Unconfirmed

(Unassigned)

26.1.1

Retrieved