mojira.dev
MC-94178

A non-JSON-text on a sign produces an unknown error

This issue is related to MC-87143
So according to the "fixed" issue named above it seems to be intended that you have to write JSON-text on signs now.
So that command works just fine:

/setblock ~ ~1 ~ minecraft:standing_sign 0 replace {Text1:"[\"test\"]",Text2:"[\"\"]",Text3:"[\"\"]",Text4:"[\"\"]"}

while the following just produces an empty sign:

/setblock ~ ~1 ~ minecraft:standing_sign 0 replace {Text1:"test",Text2:"",Text3:"",Text4:""}

However, what is probably not intended is that the 2nd command produces the following error text in the command block output line even though the sign gets placed:

An unknown error occurred while attempting to perform this command

Linked issues

Comments 5

That error message doesn't say anything wrong.

Uhm, actually it does. The error is known, since you can describe it and know when it happens. So it should not be just described as an "unknown error" what is generally a bad thing for a compiler.
Plus it is not even an error. It just can't work with the string, so it returns an empty sign. So it works perfectly fine and it does not cause any problem. It should just say "Block placed".

Reopened for Mojang to decide.

This is behaving as intended.

Internally a NullPointerException gets thrown because a line ends up being null instead of an object. This results in the vague error. There is no intention to fix this since its internal state being messed with.

A page text in a book doesn't get set to null when it's a non-JSON text:

/give @p written_book 1 0 {pages:["a","b","c"],title:"a",author:"a"}

It works just as expected. Which behavior is correct, the signs setting to null or the book accepting it?

NeunEinser

Erik Broes

Unconfirmed

Minecraft 15w50a, Minecraft 16w06a

Retrieved