There are some entities/block-entities that can resolve their text components themselves, like signs, text display entities, etc. However, giving them a selector
text component can make them hold an unresolved text component.
Summon entity A, which has a text component in its CustomName that requires resolution.
Get A's name as a
selector
text component with an entity B that can resolve its text component itself.Check the data in B. Unresolved text component exists. (
nbt
andstorage
in the example below)
/data modify storage test test set value "Hello"
/summon armor_stand ~ ~ ~ {CustomName:{storage:test,nbt:test},Tags:[t1]}
/summon text_display ~ ~ ~ {text:[{selector:"@n[tag=t1]"}," World"],Tags:[t2],billboard:center}
/data get entity @n[tag=t2] text
Text Display has the following entity data: {nbt: "test", extra: [" World"], insertion: "a4a1ec91-85a5-43e8-a32e-cf97f8c46a60", storage: "minecraft:test", hover_event: {name: {nbt: "test", storage: "minecraft:test"}, action: "show_entity", id: "minecraft:armor_stand", uuid: [I; -1532892015, -2052766744, -1557213289, -121345440]}}
The reason this behavior can be a bug is because it is temporary and unstable: if you leave and rejoin the game, they will resolve, and changing any of their NBT data will cause them to resolve.
Leave and re-join the game, or change any nbt data in B.
Check the data in B. The text component of B is now resolved.
/data merge entity @n[tag=t2] {OnGround:2b}
/data get entity @n[tag=t2] text
Text Display has the following entity data: {extra: [" World"], insertion: "a4a1ec91-85a5-43e8-a32e-cf97f8c46a60", text: "Hello", hover_event: {name: {nbt: "test", storage: "minecraft:test"}, action: "show_entity", id: "minecraft:armor_stand", uuid: [I; -1532892015, -2052766744, -1557213289, -121345440]}}
Attachments
Comments 1
