Mojira Archive
MC-279879

data values in functions not being applied when summoning

I have the following command in a function in my datapack: 

 

summon armor_stand ~7.93 ~3.65 ~12.7 {equipment: {offhand: {components: {"minecraft:banner_patterns": [{color: cyan, pattern: triangle_top}], "minecraft:base_color": white}, id: shield}}, Invisible: true, NoGravity: true, Pose: {LeftArm: [0f, 90f, 90f]}, Rotation: [180f, 0f], ShowArms: true, Tags: [banner_shield_stand, banner_stand, banners, tt]}

 

When I run the function, the banner_patterns component is not applied. That is, the armor stand is created with a banner shield that has the white base color, but no pattern. As a test, I added the following line to the function:

 

data modify entity @n[tag=tt] equipment.offhand.components merge value {"minecraft:banner_patterns": [{color: cyan, pattern: triangle_top}]}

 

Then I kill that armor stand, reload, and run the function again. Still there is no pattern.

I then run that added /data command manually, and the pattern appears.

The function is being run because the armor stand appears with the shield, and a /data get command shows the base_color component. I am sure the modified function is being run because the unique /say command I added at the same time is run. Yet neither of these sets the pattern.

So it appears to me that the banner_pattern component cannot be set from the function, which makes no sense, so I suspect maybe there's a timing issue? I dunno.

Unresolved

Ken

2025-01-29, 09:04 AM

2025-01-29, 09:37 PM

0

0

Unconfirmed

(Unassigned)

25w04a

-