Mojira Archive
MC-269487

data merge command makes armor stand have a visible, but non-existent shield

In a .mcfunction file, I run the following two commands

summon armor_stand ~2.07 ~3.65 ~-0.7 {HandItems: [{}, {components: {banner_patterns: [{color: cyan, pattern: stripe_bottom}], base_color: white}, id: shield}], Invisible: true, NoGravity: true, Pose: {LeftArm: [0f, 90f, 90f]}, Rotation: [0f, 0f], ShowArms: true, Tags: [banner_shield_stand, banner_stand, banners]}
execute as @e[tag=banner_stand] run data merge entity @s {HandItems: [{}, {components: {banner_patterns: [{color: "cyan"}], base_color: "white"}}]}

An invisible armor stand holding a shield appears – you can see the shield hovering in the air (I doubt invisibility is critical here, but this is as far as I've simplified it.)

But if you look at the armor stand's HandItems

/data get entity @e[tag=banner_stand, limit=1] HandItems

The result is [{}, {}]

Clearly this is not true, you can see the shield. But that's what the data command says.

Further, if you log out and log back, the armor stand will vanish.

I'm not sure what's wrong with the data merge command, but if it is not run, the stand is just fine.

Steps to reproduce

1) Run

/function p:foo

when inside the attached world
2) Run

/data get entity @e[tag=banner_stand, limit=1] HandItems

3) Observe that the return is empty

Expected results

The command would return data containing the fact the armor stand is holding a shield

Observed results

The command returns empty data

Invalid

Ken

2024-03-16, 02:36 AM

2024-04-04, 01:14 PM

2024-04-04, 01:14 PM

1

1

Confirmed

Important

Platform

Commands

24w11a, 24w12a, 24w13a

-