mojira.dev
MC-121827

Selectors and scoreboards not working for signs (works correctly for books, /tellraw, and /title)

When typing in commands such as:

/title @a title [{"selector":"@p"},{"score":{"name":"@p","objective":"obj"}}]

/tellraw @a [{"selector":"@p"},{"score":{"name":"@p","objective":"obj"}}]

/give @a minecraft:written_book{title:"",author:"",pages:["[{\"selector\":\"@p\"},{\"score\":{\"name\":\"@p\",\"objective\":\"obj\"}}]"]}

/give @a minecraft:sign{BlockEntityTag:{Text1:"[\"name: \",{\"selector\":\"@p\"}]",Text2:"[\"score: \",{\"score\":{\"name\":\"@p\",\"objective\":\"obj\"}}]"}}

/title, /tellraw, and the book works fine, but the sign shows the raw selector and no score.

Linked issues

Attachments

Comments 6

For me it doesnt even show @s, it just doesn't show anything, also not working for action bar and subtitle

Could someone add the labels "text-component", "score" and "nbt" to more easily find this ticket, I couldn't find it through my search queries.

EDIT
Thanks!

I'm trying to relearn these commands and I can't seem to get this right. So either it's broken again or I'm more confused then I originally thought (Most likely).. I'm in version 17w47b. I've tried:

/setblock ~ ~1 ~ sign[rotation=8]{"Text2":"{\"text\":\"Hello \"},{\"selector\":\"@a[distance=..2]\"}"} destroy


/setblock ~ ~1 ~ sign[rotation=8]{"Text2":"{\"text\":\"Hello\"},{\"selector\":\"@p\"}"} destroy

/setblock ~ ~1 ~ sign[rotation=8]{"Text2":"{\"text\":\"Hello\"},{\"selector\":\"@a[limit=1]\"}"} destroy
setblock ~ ~1 ~ sign[rotation=8]{"Text1":"{\"text\":\"Hello \"}","Text2":"{\"selector\":\"@a[limit=1]\"}"} destroy -> OUTPUT: Hello 'nextline' @a[limit=1] destroy

Hello shows up but nothing else (first three).. To be clear, I'm trying to display the players name onto the sign and eventually have it display a certain score of that player. Tellraw works great:

/tellraw @p [{"text":"Hello "},{"selector":"@a[distance=..2,limit=1]"},{"score":{"name":"@p","objective":"money"}}] -> OUTPUT: Hello name 189

I can't figure out the sign one.. EDIT: trying to make those code box things. Apologies!

Can confirm the issue is present again in 17w49b.

this still seems broken to me in 18w01a, reopen?

Works fine for me in 18w01a, at least with the commands given above

MukiTanuki

Nathan Adams

Confirmed

/tellraw, /title, nbt, score, scoreboard, selector, sign, text-component

Minecraft 17w45b, Minecraft 17w46a, Minecraft 17w49b

Minecraft 17w47a, Minecraft 18w01a

Retrieved