Steps to Reproduce:
1. Summon an armor stand holding any item:
/summon armor_stand ~ ~ ~ {ShowArms:1b,HandItems:[{id:"minecraft:diamond",count:1b}]}
2. Attempt to change its count value to 0:
/data modify entity @n[type=armor_stand] HandItems[0].count set value 0
Observed Results:
The item count stays as 1
Expected Results:
The item should disappear
Notes:
Setting the item count higher first, and then attempting to set it to 0, shows that it results in 1 instead of doing nothing at all
Comments 2
Your command formatting is incorrect, please use this instead:
/data modify entity @n[type=armor_stand] HandItems[0] set value {}
Per this changelog, the formatting no longer supports a count value of zero, but instead needs an empty '{}' to supply an empty item.
The item stack format no longer represents empty stacks (air item, or count 0)
Instead, in places that support it, the field should be ommitted
In some cases, such as lists of stacks (e.g. HandItems in living entities), an empty map ({}) is used to represent empty stacks
We do not have enough information to reproduce this issue.
Please include the following information to help us understand your problem:
Please also attach any needed commands, datapacks, resourcepacks, 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)
📓 Project Summary – ✍️ Feedback and Suggestions – 📖 Game Wiki