-
Bug
-
Resolution: Won't Fix
-
None
-
Minecraft 1.12.2, Minecraft 17w50a, Minecraft 1.13, Minecraft 18w30b, Minecraft 18w31a, Minecraft 18w32a, Minecraft 18w33a, Minecraft 1.13.1-pre1, Minecraft 1.13.1, 1.15.1, 1.15.2, 20w10a, 20w27a, 1.16.4, 20w49a, 21w03a, 21w05b
-
None
-
Confirmed
-
(Unassigned)
When the player has 2920 xp, he is supposed to just reach lvl 40, but depending on how you get the amount of xp, you can end up being lvl 39 with a maxed out xp bar.
Use these commands to set up and reset the xp value :
/xp set @p 0 levels /xp set @p 0 /gamemode survival @p
Commands in this order result with lvl 40 :
/xp add @s 2000 /xp add @s 920
Commands in this order result with lvl 39 and maxed out xp bar :
/xp add @p 920 /xp add @p 2000
This is caused by the experience value still being stored as float and used in calculation, sometimes the condition while(this.experience >= 1.0) is failing when this.experience is barely equals to 1.0 due to float precision error.
Note that no experience points are ever lost in either process.
- is duplicated by
-
MC-169576 Xp Query can be 1 off. XpTotal isn't always accurate.
- Resolved
-
MC-174288 Incorrectly experience point gain
- Resolved
-
MC-193135 XP value doesn't match the real value
- Resolved
-
MC-258919 Variable amount of experience for a level
- Resolved
- relates to
-
MC-118008 XpTotal value used as value for xp scoreboard objectives and query result of xp command is never decreased and does not change when the experience level changes
- Open