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

Variable amount of experience for a level

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Duplicate
    • None
    • 1.19.3
    • None
    • Unconfirmed
    • (Unassigned)

      The bug

      Depending on your current amount of experience, reaching a level can be more expensive. This may have been there for a long time, I didn't find any related issue.

      Steps to reproduce

      Using commands, make sure you have no xp. Then, add 1395 xp. You should be at level 30.

      Reproduce the same step, but now add 1394. Then 1. And you should stay at level 29.

      Explanation

      The way experience is added use the floating value of the xp bar. However, an amount for a level is a definite integer number. Depending on how much experience you're adding, the floating value will or will not round to the next integer. The function should be change to not refer to this floating value, but integer instead.

            Unassigned Unassigned
            Pardys_ Pardys_
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: