mojira.dev
MC-108908

Testforblock can't detect signs with a '=' in them

The command I'm trying to execute:

execute @e[tag=CC] ~ ~ ~ testforblock ~ ~ ~ wall_sign 4 {Text4:"{\"text\":\"\"}",Text3:"{\"text\":\"\"}",Text2:"{\"text\":\"\"}",Text1:"{\"text\":\"=\"}"}

It works with everthing except '='. This exact command was used to detect over 150 different lines of text on sign. All of them work except this one.

Error message in command block:

[16:42:58] Failed to execute 'testforblock ~ ~ ~ wall_sign 4 {Text4:"{\"text\":\"\"}",Text3:"{\"text\":\"\"}",Text2:"{\"text\":\"\"}",Text1:"{\"text\":\"=\"}"}' as Armor Stand

Comments 2

Certain characters (as defined by the GSON library) are converted to unicode, which includes the equals sign. You will instead need to look for the unicode character, being \u003d:

execute @e[tag=CC] ~ ~ ~ testforblock ~ ~ ~ wall_sign 4 {Text4:"{\"text\":\"\"}",Text3:"{\"text\":\"\"}",Text2:"{\"text\":\"\"}",Text1:"{\"text\":\"\u003d\"}"}

Thank you very much!

cpmct32

(Unassigned)

Unconfirmed

Minecraft 1.10.2

Retrieved