When using the /give command to obtain a container item (e.g. chest, shulker box) that contains an item with the attribute_modifiers component, the game throws an error (crash/console error) instead of granting the container as expected.
Reproduction Steps:
Execute the /give command using a command block:
give @a barrel[container=[{slot:0,item:{id:diamond_chestplate,count:1,components:{attribute_modifiers:[{type:armor,amount:1.0,operation:add_value,id:1772450770122}]}}}]]It will produce confusing error messages
Expected Behavior:
A barrel containing a diamond chestplate that grants 1 armor point appears in the player's inventory
Actual Behavior:
Command block throws an error, and the container is not given to the player
Environment
vanilla
Thank you for helping us improve Minecraft! We saved your files: