Mojira Archive
MC-144622

Using data modify to set the name from a block only works once

How to reproduce

# initialize
scoreboard objectives add tmp dummy
scoreboard players set @p tmp 1
summon armor_stand ~ ~ ~ {CustomNameVisible:1b,Tags:["tmp"]}

# loop
setblock 0 0 0 minecraft:spruce_sign{Text1:'{"score":{"objective":"tmp","name":"@p"}}',Text2:'""',Text3:'""',Text4:'""'}
data modify entity @e[tag=tmp,limit=1] CustomName set from block 0 0 0 Text1
setblock 0 0 0 minecraft:air

This will set the name to 1, but won't update the name if the score is changed.

note: This can be worked-around by adding a `data modify entity @e[limit=1,tag=tmp] CustomName set value '""'` command to the loop