If, by editing the world file with the player statistics, you set any value exceeding the 32-bit integer limit, that is, 2^31-1, and then re-join the world and enter the statistics, you will notice that the set value was automatically converted to a negative 2^31, although in my opinion the minimum value of the player's statistics should be 0 because the numbers below just don't make sense. How to make this:
If you haven't jumped in your world before, then do it and then exit it.
Open the saves folder and select any world.
Go to the folder «players».
Then to the folder «stats».
You will see a «json» format file in this file and all player statistics are stored.
Open this file and find «minecraft:jump». This is the number of times you have jumped in your world.
Change this value to 2^31-1, that is, 2147483647.
Save the changes and join the world.
Look at the statistics and notice that the number of jumps is now 2147483647 and then jump and look at the value of the jumps again. It has not reset to zero or increased (which is impossible due to the fact that in 32-bit programming the maximum positive number is 2147483647), but simply remains the same.
Get out of the world and now change the jump value to any number greater than 2147483647. This number is the maximum positive number in 32-bit systems.
Go into the world and notice that the set value was automatically converted to a negative value of 2^31, that is, to -2147483648.
Jump again and check the value. Now it is -2147483647, which means that it will just start increasing closer to zero.
And if the resulting value is changed to anything less than -2147483648, then after join the world you will see that it has been converted back to 2147483647.
Possible solution: either let the minimum possible value in the player's statistics be 0, or completely switch Minecraft to a 64-bit programming system.
Comments 4
You're right about the fact that no one can make more than 2 billion jumps in one world, if a game character can jump a maximum of 2 times per second, it will take more than 2 thousand years to jump 2^31-1 times, and it's obvious that people don't live that long, and even if you put something on the space bar and leave the computer in in this state, he definitely won't survive for so long and will die, so it's really impossible to jump 2147483647 times without editing the statistics file. However, there are other statistical values besides just the number of jumps. As for the 64-bit programming system, most likely not because, as you said, the optimization of the game will noticeably decrease and, plus, there will definitely be a lot of technical difficulties in switching from the usual 32-bit system to 64-bit. And of course, performing the same actions on a 64-bit system will lead to the same result - the integer value of the variable will overflow and be converted to negative 2^64-1. But I think that no one will argue with the fact that the minimum possible value of a player's stats should be zero, and as for the limit, of course, everything is much more complicated here.
Thank you for your report!
After consideration, the issue is being closed as Invalid.
This report does not describe a bug.
Quick Links:
📓 Bug Tracker Guidelines – 💬 Community Support – 📧 Mojang Support (Technical Issues) – 📧 Microsoft Support (Account Issues)
📓 Project Summary – ✍️ Feedback and Suggestions – 📖 Game Wiki
Isn’t this basic integer overflow? When the maximum integer value is exceeded, the bytes flip around and gets reset to the minimum integer value.
I doubt highly anyone has ever jumped more than 2 billion times in a single world
Oh, and by the way, with a 64-bit programming system:
The issue does not get solved, entering 2^64-1 and jumping once, will just do the same you described, but get the number set to -2^64
Optimization-wise is this a bad idea, because Minecraft will just consume a lot more RAM, because a
longconsumes more memory than anìntor ashort