-
Bug
-
Resolution: Unresolved
-
None
-
25w02a, 25w05a
-
None
-
Confirmed
-
Commands
-
Important
-
Platform
Due to text components being changed from strings containing JSON to NBT structures, the messages lists in signs can be either a list of 4 strings or a list of 4 compounds. If all lines are unformatted, they resolve to strings.
A side-effect of this change is that it is no longer possible to replace a single line with formatted text if all lines are currently unformatted (because the list cannot contain a compound and 3 strings).
This is a breaking change as before it was always 4 strings regardless of text formatting.
Steps to Reproduce:
- Open a singleplayer world in 1.21.4
- Place a sign
- Stand inside of it and run
/data modify block ~ ~ ~ front_text.messages[0] set value '{"text":"Hello","bold":true}'
- Observe the sign
- Close your game and relaunch in 25w02a then reopen the world.
- Destroy the sign and replace it
- Stand inside of it and run
/data modify block ~ ~ ~ front_text.messages[0] set value {text:"Hello",bold:true}
- Observe the sign
Observed Results:
In 1.21.4, the bold line correctly replaces the first line. This works because you are changing the list from
["","","",""]
to
['{"bold":true,"text":"Hello"}',"","",""]
In 25w02a, the command that you would expect to do the same thing fails because you are essentially attempting to change
["","","",""]
to
[{bold:true,text:"Hello"},"","",""]
which is illegal as NBT lists may only contain a single type.
Expected Results:
In both versions, the respective command should modify the first line of the sign to say "Hello" in bold.
- is duplicated by
-
MC-279255 SNBT text componets prevents editing lines of a sign without rewriting all other lines as compound tags at the same time
- Resolved