How can you make a infinity damage sword?

This is impossible. "Infinity" anything will crash every computer that has ever been or will ever be created. Just pretend that that is infinity, it is not survivable to any entity currently in the game, or likley any that will, as the game uses a 32 bit integer for damage values.


Try setting the amount to 1.79769313486232E+308d To make this command.

give @p netherite_sword{Unbreakable:1b,AttributeModifiers:[{AttributeName:"generic.attack_damage",Name:"generic.attack_damage",Amount: 1.79769313486232E+308d,Operation:0,UUID:[I;439,684,724,99]}]} 1

This worked about a year ago. I haven't tested it though.