Star Hype News.

Premium celebrity moments with standout appeal.

news

How can you make a infinity damage sword?

By Sophia Vance

I found this command : /give @p netherite_sword{Unbreakable:1b,AttributeModifiers:[{AttributeName:"generic.attack_damage",Name:"generic.attack_damage",Amount:2147483647,Operation:0,UUID:[I;439,684,724,99]}]} 1 it will give me a sword with 2147483647 attack damage but I want this to be INFINITY attack damage can you fix the command to make it infinity please?

1

3 Answers

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.

3

Try setting the amount to 1.79769313486232E+308dTo 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.

In Minecraft, you can't have an "infinity" damage sword. This is because computers, which Minecraft runs on, don't understand "infinity". Computers store numbers as a series of 1s and 0s, really, "on" and "off". Minecraft stores numbers with up to 32 of these ons and offs.

2147483647 is the biggest number that you can have with 32 ons and offs, otherwise known as 32 "bits", so you can't have a sword with more damage than that.

However, you can rest easy knowing that that sword can kill anything in the vanilla game not created with commands.