mojira.dev
MC-259199

data modify string sub command ignores insert and append

The /data modify subcommand string gives an error when attempting to use append or insert into another string.

This may or may not be intended, however it makes the string subcommand nearly useless in most use cases without being able to insert or append into another string.

 

Comments 3

Insert, append and prepend are in regards to lists and arrays. This ability was never announced for strings. Feature request, not a bug.

When wanting to show the string, simply use the "nbt" option in json text to select both strings, so they appear as appended.

Can confirm for 23w06a

Not being able to concatenate strings after they have been split makes the /data ... string command nearly useless.

for example appending string "b" to string "a" resulting in "ab"

/data modify storage minecraft:test str.b append string storage minecraft:test str.a

Those are array commands, not string commands.

MukiTanuki

(Unassigned)

Community Consensus

Commands

/data, /data-modify, command

23w03a, 23w04a, 23w05a, 23w06a

Retrieved