-
Bug
-
Resolution: Unresolved
-
None
-
20w13b, 20w15a, 20w28a, 1.16.2 Pre-release 1, 1.16.3, 1.16.4, 20w48a, 20w51a, 21w03a, 1.17.1, 24w13a, 1.21.4
-
None
-
Confirmed
-
Statistics
-
Low
-
Platform
The way MC-79944 was fixed the statistics just stay at the maximum value instead of overflowing.
In practice this technically fixes the overflow issue, but is actually not more useful than going negative.
From my knowledge of the code I can't see a reason why using a long instead of int (as a commenter on the original report suggested) would not be possible. The storage format (json) would allow for storing numbers up to 2^53 accurately by which point the value of the statistic is way out of reach for any survival player, while reaching 2^31 for example on the 'Distance by Elytra' statistic is possible by actively playing on the same world for a few months.
Reproduction Steps (slightly adjusted from https://bugs.mojang.com/browse/MC-79944?focusedCommentId=633888 ):
- Summon a few zombies with
/summon zombie ~ ~ ~ {HandItems:[{id:"diamond_axe",Count:1,tag:{Enchantments:[{id:"sharpness",lvl:2147483647}]}},{}]}
- Give yourself resistance
/effect give @s minecraft:resistance 1000000 4 true
- and resist the damage in survival mode
/gamemode survival