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.
Comments 3
Fair question. I looked and saw many messages like the following:
[00:39:53] [Server thread/WARN]: Failed to parse equipment: Duplicate entry for key: 'b[type=minecraft:banner_patterns, removed=false]'; No key pattern in MapLike[{color:"cyan"}] missed input: {banner_patterns:[],"minecraft:banner_patterns":[{color:"cyan",pattern:"minecraft:stripe_bottom"}]} missed input: {offhand:{components:{banner_patterns:[],"minecraft:banner_patterns":[{color:"cyan",pattern:"minecraft:stripe_bottom"}],"minecraft:base_color":"white"},count:1,id:"minecraft:shield"}}
I say "many" because the function actually creates 40+ shields this way with the same issue. Is this telling me that "cyan" must be "minecraft:cyan"? Until the introduction of components, "Minecraft:" was assumed in front of names if no namespace was specified; now it is required for components themselves. Maybe this is one of the places where "Minecraft:" is now required? I don't think so, because (as shown) the manually entered command is exactly the same as the one in the function, why would the namespace be required in the function and not in the chat command inputs?
We do not have enough information to reproduce this issue.
Please include the following information to help us understand your problem:
Steps to Reproduce:
(Explain what needs to be done for the issue to happen)
Observed Results:
(Briefly describe what happens)
Expected Results:
(Briefly describe what should happen)
Please also attach any needed commands, add-ons/behavior packs, data packs, resource packs, screenshots, videos, or worlds needed to help reproduce this issue.
Refer to the Bug Tracker Guidelines for more information about how to write helpful bug reports. Bug reports with insufficient information may be closed as Incomplete.
This issue is being temporarily resolved as Awaiting Response. Once the requested information has been delivered, the report will be reopened automatically.
Quick Links:
📓 Bug Tracker Guidelines -- 💬 Community Support -- 📧 Mojang Support (Technical Issues) -- 📧 Microsoft Support (Account Issues) -- ✍️ Feedback and Suggestions -- 📖 Game Wiki
Is anything listed in the game (server) log when running the function?