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
Here is the exact behavior in game.