How to avoid the crash
Instructions on correctly creating items with attributes. Requires knowledge of MCEdit. It is possible to edit the world's NBT directly, but it is far easier to do and much harder to mess up in MCEdit, so these are MCEdit instructions.
- First, you will need MCEdit and the AddAttribute filter
- Open your world in Minecraft and create a chest with the item (to which you want to add the attribute(s)) in it
- Save and quit the world
- Open MCEdit
- Click "Load World...", select the world you want to edit, and then click "Load"
- Select the chest
- Click on the "Filter" button in the hotbar and select the "Add Attribute Modifier" filter
- Choose the attribute settings you want, and be sure to put some number (pick something between 1 and 1000) in the "Label" field
- Click "Filter" at the bottom of the dialog box and wait for MCEdit to finish running the filter
- Save and Quit MCEdit