You can now use a new attribute format to set the attributes on custom items, making it much easier! Just set the slot as a key under "attributes", and then under that slot key, add each attribute you want to add to for that slot and a number. For example:
Code (YAML):
item :
attributes :
head :
armor
: 2
speed
: 2
maxHealth
: 5
mainHand :
speed
: 5
armor
: 0.1