mojira.dev
MC-124310

Names do not accept anything but a text-type

The Bug itself

An empty (but also not empty??The String is not simply an empty string??) string will be displayed if a other text type than {"text":"HERE_IS_TEXT"} is used.

Recreating the Bug

  1. Create a scoreboard objective with

    /scoreboard objectives add ADummy dummy
    /scoreboard objectives add ADummy dummy
  2. Give yourself a test-value with

    /scoreboard players set @p ADummy 1337
    /scoreboard players set @p ADummy 1337
  3. Summon a creeper with

    /summon creeper ~ ~ ~ {CustomName:"{\"score\":{\"name\":\"@p\",\"objective\":\"ADummy\"}}"}
    /summon creeper ~ ~ ~ {CustomName:"{\"score\":{\"name\":\"@p\",\"objective\":\"ADummy\"}}"}

In theory this should give the creeper a (displayed) name of "1337". But instead it shows an empty string.

However... If the command

/data get entity @e[limit=1,type=creeper]
/data get entity @e[limit=1,type=creeper]

is run, you can clearly see, that the value of the name, we typed in when we summoned the creeper, is stil in there which suggests there is something wrong with converting scoreboard objectives into plain-name-text.

(This also happens with an item by typing:

/summon item ~ ~ ~ {Item:{id:"minecraft:torch",Count:1,tag:{display:{Name:"{\"score\":{\"name\":\"@p\",\"objective\":\"ADummy\"}}"}}}}
/summon item ~ ~ ~ {Item:{id:"minecraft:torch",Count:1,tag:{display:{Name:"{\"score\":{\"name\":\"@p\",\"objective\":\"ADummy\"}}"}}}}

)

Comments 4

The score and selector options are special for only a few places of text components (like tellraw), names are not one of those places.

Does this also not include Books? Because I tried it and it appered to me, that it does not work in books either, which is a shame. 😞

@@unknown, it should work in books. Could you please provide the command you used to create the book?

book pages are one of those special places.

Florian

(Unassigned)

Unconfirmed

Minecraft 18w02a

Retrieved