-
Bug
-
Resolution: Fixed
-
1.20.5 Pre-Release 1, 1.20.6, 24w18a
-
None
-
Confirmed
-
Commands
-
Normal
-
Platform
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 what set_lore uses.
/item modify entity @s weapon {function:set_lore,lore:[],mode:replace_all}
- The command succeeds