mojira.dev
MC-79944

Various statistics overflow at 32-bit integer limit

The bug

Upon reaching 2,147,483,647 centimeters counter is reset to a negative value.

Linked issues

Attachments

Comments 16

Tan Chin Cheern

Int value overflow.

Atlas Abraham Weed

Duplicated by MC-79954

No it's not. Please actually read the descriptions.

Tan Chin Cheern

What do you mean its not? An Int tag is an integer between -2,147,483,648 and 2,147,483,647 (inclusive).
From http://www.minecraft.gamepedia.com/Commands

MC-79954 is about scoreboard values, MC-79944 is about statistics.

6 more comments

My method of checking if this is actually fixed, maybe for others or in case it isn't:

  • Summon a bunch of OP zombies by repeating this command a few times:

    /summon zombie ~ ~ ~ {HandItems:[{id:"diamond_axe",Count:1,tag:{Enchantments:[{id:"sharpness",lvl:32767}]}},{}]}
  • Make sure that you resist all damage:

    /effect give @s minecraft:resistance 1000000 4 true
  • Make yourself the zombies' punching bag:

    /gamemode survival

This way you resist 16395 damage about twice per second, reaching the 32 bit integer limit in about 20 minutes.

I'll report back in 20 minutes whether this bug is actually fixed, at least for that statistic.

sharpness up to 2147483647 is possible too

and the damage of multiple sharpness enchantments adds up

Oh, thanks for that tip. This way it's almost instant. The scoreboard still overflows, but the statistic stays at the integer limit, as expected. That report is MC-79954. Fix for this report confirmed.

It is possible to test this by editing the statistics. The statistics are stored in the "stats" folder, in a JSON file that can be edited. Changing the numbers to 2147483647 (2^31-1) and then checking in game can greatly simplify the verification.

But that's not supported. I wanted to test it in a way that is actually supported. And in 20w07a it's possible again to teleport to y=29999990 and fly up.

Gorlov Maxim

kingbdogz

Confirmed

(Unassigned)

distance, minecart, overflow, statistics

Minecraft 1.8.4, Minecraft 1.9, Minecraft 1.10.2, Minecraft 16w43a, Minecraft 1.11.2, ..., Minecraft 18w03b, Minecraft 1.13.1, Minecraft 1.14.3, Minecraft 1.14.4 Pre-Release 3, Minecraft 1.14.4 Pre-Release 5

20w07a

Retrieved