Uploaded image for project: 'Minecraft: Java Edition'
  1. Minecraft: Java Edition
  2. MC-271084

Inconsistent Results When Using /xp query After Giving Player a Large Amount of Experience Points

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Unresolved
    • None
    • 1.20.5, 1.21.1, 24w35a
    • Confirmed
    • Commands
    • Low
    • Platform

      When giving the player large amounts of XP via the /xp add command, inconsistent results are obtained when querying the player's xp afterwards, depending on whether the XP was added all at once or in multiple steps.

       

      How to reproduce:

      1. Give the player 16,000,000 experience points with /xp add Player 16000000 points
      2. Query the player's experience points with /xp query Player points
      3. Minecraft returns the result: "Player has 10668 experience points"
      4. Reset the player's XP
      5. Give the player 8,000,000 experience points with /xp add Player 8000000 points
      6. Repeat step 5 once
      7. Query the player's experience points with /xp query Player points

      Expected outcome: Minecraft returns the result: "Player has 10668 experience points"

      Actual outcome: Minecraft returns the result: "Player has 10686 experience points"

      Neither of these results are correct - 16 million points should be equivalent to 1903 levels + 10677 points. Similar inconsistencies occur when dealing with experience amounts around this ballpark or higher.

       

            Unassigned Unassigned
            arcatex177 arcatex177
            Votes:
            3 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              CHK: