Affects Version/s: Minecraft 1.14 Pre-Release 2, Minecraft 1.14 Pre-Release 3, Minecraft 1.14 Pre-Release 4, Minecraft 1.14 Pre-Release 5, Minecraft 1.14
Fix Version/s: None
Environment:Windows 10 (64-bit)
Java 8u201 (64-bit)
Intel Core i7-7700K CPU @ 4.20GHz (8 CPUs)
NVIDIA GeForce GTX 1050
Also applies to any vanilla Minecraft server in the versions affected.
What I expected to happen was...:
When using an anvil/enchanting table and consuming levels, scoreboards with "xp" as criteria would update to reflect the new total amount of xp for the player.
What actually happened was...:
Instead of that, the scoreboards don't update at all, regardless of how many levels you used up.
Steps to Reproduce:
1) Run /scoreboard objectives add test xp
2) Run /scoreboard objectives setdisplay sidebar test
3) Go into survival mode, get some xp and do any anvil work/enchanting. The scoreboard value will not update.
Gaining more xp after this doesn't change the values to normal at all.
It seems that the XpTotal player data tag is linked to all scoreboards with "xp" as criteria.
The only way that I found to get the correct xp amount is using /xp query for levels and points and manually calculating it using scoreboard operations. However, this is a terrible approach, since those commands don't work for multiple entities at the same time. Besides, /xp query @s points does not return the total xp points, but a value equivalent to (total points)-(points to the current level).
This could be potentially game breaking, since none of the actions that consume xp in the game are properly computed. Still, I'm not sure if this is a thing on past versions. (Not that the bug tracker lets me select them anyway).