What is the command that gives a diamond sword 1 heart of damage instead of the regular?

Solution 1:

This is the command to give a diamond sword that does 1 heart of damage:

/give @p minecraft:diamond_sword 1 0 {AttributeModifiers:[{AttributeName:"generic.attackDamage",Name:"generic.attackDamage",Amount:1,Operation:0,UUIDMost:97164,UUIDLeast:107213}]}