Negative Score on Death
The bug
The number of points on the death screen becomes negative with a very large number of experience levels.
How to reproduce
Enter these commands step by step:
/xp add @s 1999999999 points (10 times) /kill @s
→ The number of points on the death screen now displays a large negative number (about -1474836390)
Linked Issues
- Won't Fix
user33
William Eaton
- 12
- 13
- Confirmed
- (Unassigned)
- death-screen negative score
1.5.1 - 1.17.1
1.5.1 1.5.2 13w19a 13w21b 13w22a 1.7.4 14w03b 14w20b 14w21a 14w21b 1.8-pre1 1.10.2 16w41a 16w42a 16w43a 1.11-pre1 1.11.2 1.12-pre6 1.12.1 1.12.2 17w45a 17w50a 18w06a 1.13-pre6 1.13.1 1.13.2 18w45a 18w46a 1.14.4 19w34a 19w37a 19w42a 1.15-pre6 20w08a 1.16.1 20w29a 1.16.2 1.16.3-rc1 1.16.3 1.16.4 20w46a 20w51a 21w03a 1.16.5 21w05b 21w06a 21w07a 21w11a 21w14a 21w15a 21w16a 21w17a 21w20a 1.17 1.17.1
Created Issue:
Negative Score on Death
When you give the command /xp 1999999999 "insert username here" twice and do the /kill command, you will get a large amount of negative XP.
Environment
Macintosh OSX, original minecraft.jar
When you give the command /xp 1999999999 "insert username here" twice and do the /kill command, you will get a large
amount ofnegativeXP.When you give the command /xp 1999999999 "insert username here" twice and do the /kill command, you will get a large negative score.
Seems to be fixed in 14w21b.
relates to
Macintosh OSX, original minecraft.jar
Mac OS X
When you give the command /xp 1999999999 "insert username here" twice and do the /kill command, you will get a large negative score.
When you give the command /xp 1999999999 "insert username here" twice and do the /kill command, you will get a large negative score.
is duplicated by
relates to
Mac OS X
relates to
When you give the command /xp 1999999999 "insert username here" twice and do the /kill command, you will get a large negative score.
The bug
The number of points on the death screen becomes negative with a very large number of experience levels.
How to reproduce
Enter these commands step by step:
/xp add @s 1999999999 levels /kill @s→ The number of points on the death screen now displays a large negative number (about -294967134)
Might relate to
MC-3266
The bug
The number of points on the death screen becomes negative with a very large number of experience levels.
How to reproduce
Enter these commands step by step:
/xpadd@s 1999999999 levels /kill @s→ The number of points on the death screen now displays a large negative number (about -294967134)
The bug
The number of points on the death screen becomes negative with a very large number of experience levels.
How to reproduce
Enter these commands step by step:
/xp set @s 1999999999 levels /kill @s→ The number of points on the death screen now displays a large negative number (about -294967134)
The bug
The number of points on the death screen becomes negative with a very large number of experience levels.
How to reproduce
Enter these commands step by step:
/xpset@s 1999999999levels/kill @s→ The number of points on the death screen now displays a large negative number (about -294967134)
The bug
The number of points on the death screen becomes negative with a very large number of experience levels.
How to reproduce
Enter these commands step by step:
/xp add @s 1999999999 points (10 times) /kill @s→ The number of points on the death screen now displays a large negative number (about -294967134)
The bug
The number of points on the death screen becomes negative with a very large number of experience levels.
How to reproduce
Enter these commands step by step:
/xp add @s 1999999999 points (10 times) /kill @s→ The number of points on the death screen now displays a large negative number (about -
294967134)The bug
The number of points on the death screen becomes negative with a very large number of experience levels.
How to reproduce
Enter these commands step by step:
/xp add @s 1999999999 points (10 times) /kill @s→ The number of points on the death screen now displays a large negative number (about -1474836390)
is duplicated by
Relates to MC-79545.
Duplicate of MC-15876





Confirmed.
From what I can see here, this is because of the code behind the /xp command.
1,999,999,999 (What he typed in)
2,147,483,647 (Limit of an int)
Variables initialized in Minecraft 1.5.2's code (may be partially modified, notify me if so)
private int aN;
private int aS;
private aL[][] a;
private boolean t;
private S c;
I don't know if any of that could possibly have anything to do with it, as what he entered is not as big as an int's max value, but I don't know if the command's arguments are stored in an int, possibly a string. It would depend on the command, however.
Honestly, I don't even know what I'm saying, just decided to poke around the code for a bit and see what I could come up with.
Is this still a concern in the current Minecraft version? If so, please update the affected versions in order to best aid Mojang ensuring bugs are still valid in the latest releases/pre-releases.
(Automatic Message)
Confirmed for 14w21b.
Confirmed for 1.8-pre1.
This is just because all numbers in minecraft are essentially modulo some power of 2. You can see a similar behavior by giving yourself a very large scoreboard value and adding to it.
Confirmed for 17w45a with the following commands:
/xp set @p 1999999999 levels
/kill @p
This will give a score of -20
Confirmed for 17w50a
user33 this ticket is yours now.
Thanks.
I can no longer reproduce this issue in 18w02a
Can anyone confirm this?
Confirmed for 1.13.1.
Confirmed in 1.16.1.
Affects 20w27a
Can confirm for 20w29a.
Can confirm in 20w51a.
Could this be that the integer limit for the XP that Minecraft uses was passed?
This might be related to when a statistic in the Game Menu goes past the 16 bit (If my memory serves me right) Integer limit the number be displayed becomes negative.
hope this helps!
Can confirm in 21w03a.
Can confirm in 21w05b.
Can confirm in 21w06a
Can confirm in 21w07a. Video attached.
Can confirm in 21w11a.
Can confirm in 21w14a.
Can confirm in 21w15a.
Can confirm in 21w16a.
Can confirm in 21w17a.
Can confirm in 1.16.5 and 21w20a.
Can confirm in 1.17.
Can confirm in 1.17.1.