mojira.dev
MC-144316

Setblocking/filling a sign without explicitly setting all Text tags, shows 'an unexpected error occured'

The bug

When placing a sign (with either /fill or /setblock) with any NBT without explicitly setting `Text1`, `Text2`, `Text3` and `Text4`, shows the message "An unexpected error occurred trying to execute that command", eventhough the sign seems to be placed correctly. This leads to the block nbt not being able to be used in things like /data modify.

How to reproduce

# the following commands work:
setblock ~ ~ ~ minecraft:spruce_sign
setblock ~ ~ ~ minecraft:spruce_sign{Text1:"\"\"",Text2:"\"\"",Text3:"\"\"",Text4:"\"\""}

# the following commands don't work:
setblock ~ ~ ~ minecraft:spruce_sign{Text1:"\"\""}
setblock ~ ~ ~ minecraft:spruce_sign{Color:"blue"}


# trying to copy Text1 to an entity's name doesn't work if it throws the error message:
summon minecraft:armor_stand ~ ~ ~ {CustomNameVisible:1b,Tags:["this"]}
setblock ~ ~ ~ minecraft:spruce_sign{Text1:"{\"score\":{\"objective\":\"tmp\",\"name\":\"@e[limit=1,tag=this]\"}}"}
data modify entity @e[tag=this,limit=1] CustomName set from block ~ ~ ~ Text1
# --> the name doesn't update

Linked issues

Comments 3

The bug is not explicitly setting all the 4 Text tags raises a NPE.

Present in 19w08a.

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

AlexMCool

slicedlime

Confirmed

(Unassigned)

Minecraft 19w07a, Minecraft 19w08a, Minecraft 19w08b, Minecraft 19w09a, Minecraft 19w11a, ..., Minecraft 1.14 Pre-Release 2, Minecraft 1.14 Pre-Release 3, Minecraft 1.14 Pre-Release 4, Minecraft 1.14 Pre-Release 5, Minecraft 1.14

Minecraft 1.14.1 Pre-Release 1

Retrieved