Affects Version/s: 20w13b, 20w15a, 20w28a, 1.16.2 Pre-release 1, 1.16.3, 1.16.4, 20w48a, 20w51a, 21w03a, 1.17.1
Fix Version/s: None
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
- Give yourself resistance
- and resist the damage in survival mode