Unlike all other loot functions that feature a list, set_attributes
does not accept an empty modifiers
list.
This makes it more difficult to remove all attribute modifiers, as you can't simply use an empty list with replace
enabled.
How to reproduce:
Hold an item
Run the following command in chat
/item modify entity @s weapon {function:set_attributes,modifiers:[],replace:1b}
Notice the error message:
Failed to parse structure: Not a list: {function:"set_attributes",modifiers:[],replace:1b}; List must have contents ...eplace:1b}<--[HERE]
Try the same thing but with
set_lore
, or any other item function. In this case,mode
is used since that is whatset_lore
uses./item modify entity @s weapon {function:set_lore,lore:[],mode:replace_all}
The command succeeds
Comments 3
Please provide repro steps with correct syntax. The set_attributes
function doesn't have a mode
field.
Thank you for your report!
We do not have enough information to find the cause of this issue.
Please provide detailed steps of reproduction to this report.
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