mojira.dev
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

Comments 6

Please do not mark unreleased versions as affected.
You don't have access to them yet.

Confirmed for 1.15.2 and 20w06a

Confirmed for 20w15a

Confirmed for 20w16a

AlexMCool

(Unassigned)

Confirmed

(Unassigned)

Minecraft 19w08b, Minecraft 19w09a, Minecraft 19w11a, Minecraft 19w11b, Minecraft 19w12a, ..., 1.15.2, 20w06a, 20w14a, 20w15a, 20w16a

20w17a

Retrieved