-4

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
  • Wh- why would you want this?! It ruins the whole challenge of things like hardcore! Commented May 9, 2022 at 20:48

3 Answers 3

4

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
  • 1
    Not really. You can just mark infinity or have a value maxto infinity, like in JavaScript. And yes marking as infinity is legit because infinity really doesn't even exist in the first place
    – Penguin
    Commented Feb 13, 2021 at 7:49
  • Lol that's really a matter of opinion, it's not really something you can prove either way.
    – Millard
    Commented Apr 26, 2022 at 16:56
  • Yeah. BUT WHY WOULD YOU DO THAT?! Commented May 9, 2022 at 20:49
2

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.

1

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.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .