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

Your experience level overflows once it exceeds the integer limit

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • 24w33a
    • Minecraft 1.4.4, Minecraft 1.4.5, Minecraft 1.4.6, Minecraft 1.4.7, Snapshot 13w02a, Snapshot 13w02b, Snapshot 13w03a, Minecraft 1.5.1, Minecraft 1.7.4, Minecraft 14w03b, Minecraft 1.8, Minecraft 1.8.1-pre3, Minecraft 1.8.4, Minecraft 1.8.7, Minecraft 1.8.9, Minecraft 16w05b, Minecraft 1.10.2, Minecraft 16w32a, Minecraft 16w32b, Minecraft 16w33a, Minecraft 16w35a, Minecraft 16w39b, Minecraft 16w39c, Minecraft 16w41a, Minecraft 16w43a, Minecraft 16w44a, Minecraft 1.11 Pre-Release 1, Minecraft 1.11, Minecraft 1.11.1, Minecraft 1.11.2, Minecraft 17w06a, Minecraft 17w13a, Minecraft 17w13b, Minecraft 17w14a, Minecraft 17w15a, Minecraft 17w16a, Minecraft 17w17b, Minecraft 17w18a, Minecraft 17w18b, Minecraft 1.12 Pre-Release 1, Minecraft 1.12 Pre-Release 2, Minecraft 1.12 Pre-Release 3, Minecraft 1.12 Pre-Release 4, Minecraft 1.12 Pre-Release 5, Minecraft 1.12 Pre-Release 6, Minecraft 1.12 Pre-Release 7, Minecraft 1.12, Minecraft 17w31a, Minecraft 1.12.1 Pre-Release 1, Minecraft 1.12.1, Minecraft 1.12.2 Pre-Release 1, Minecraft 1.12.2 Pre-Release 2, Minecraft 1.12.2, Minecraft 17w43a, Minecraft 17w43b, Minecraft 17w45a, Minecraft 17w48a, Minecraft 17w50a, Minecraft 18w01a, Minecraft 18w03b, Minecraft 18w06a, Minecraft 18w09a, Minecraft 18w14b, Minecraft 18w16a, Minecraft 18w19b, Minecraft 18w20c, Minecraft 18w22c, Minecraft 1.13-pre1, Minecraft 1.13-pre2, Minecraft 1.13-pre3, Minecraft 1.13-pre4, Minecraft 1.13-pre5, Minecraft 1.13-pre6, Minecraft 1.13-pre7, Minecraft 1.13-pre8, Minecraft 1.13-pre9, Minecraft 1.13-pre10, Minecraft 1.13, Minecraft 18w30b, Minecraft 18w31a, Minecraft 18w32a, Minecraft 1.13.1-pre1, Minecraft 1.13.1-pre2, Minecraft 1.13.1, Minecraft 1.13.2-pre1, Minecraft 1.13.2-pre2, Minecraft 1.13.2, Minecraft 18w43a, Minecraft 18w43b, Minecraft 18w43c, Minecraft 18w44a, Minecraft 18w45a, Minecraft 18w48a, Minecraft 18w48b, Minecraft 18w49a, Minecraft 18w50a, Minecraft 19w02a, Minecraft 19w03a, Minecraft 19w03c, Minecraft 19w04b, Minecraft 19w07a, Minecraft 19w12b, Minecraft 19w13b, Minecraft 19w14a, Minecraft 1.14 Pre-Release 2, Minecraft 1.14 Pre-Release 3, Minecraft 1.14.3, Minecraft 1.14.4 Pre-Release 5, Minecraft 1.14.4 Pre-Release 6, 1.14.4, 19w39a, 19w40a, 1.15 Pre-release 6, 1.15, 1.15.1, 1.15.1 Pre-release 1, 1.15.2 Pre-release 2, 1.15.2, 20w11a, 20w17a, 20w20b, 20w21a, 20w22a, 1.16 Pre-release 2, 1.16.1, 20w29a, 20w30a, 1.16.2 Pre-release 1, 1.16.2 Release Candidate 1, 1.16.2, 1.16.3, 1.16.4, 20w46a, 20w48a, 20w49a, 20w51a, 21w03a, 1.16.5, 21w05b, 21w06a, 21w07a, 21w11a, 21w13a, 21w14a, 21w15a, 21w17a, 21w18a, 1.17, 1.17.1, 21w39a, 1.18.1, 1.18.2, 1.19, 1.19.2, 1.19.3, 1.19.4, 23w14a, 1.20 Release Candidate 1, 1.20, 1.20.1, 1.20.2, 1.20.4, 1.21
    • Confirmed
    • Player
    • Low
    • Platform

      The bug

      The XP level can overflow causing the experience bar to disappear.

      How to reproduce

      1. Type /xp set @s 2147483647 levels. Now your level is 2147483647.
      2. Type /xp add @s 1 levels. XP disappears from display.
      3. Type /xp add @s 1 levels again. Now your level is 1.

      So, maximum player's level is 2^31 - 1, after which the level overflows and is treated as 0. The possible solution (suggested by mustek) is to cap maximum level.

        1. MC-3266.mp4
          1.88 MB
          [Mod] Avoma
        2. MC-3266.png
          584 kB
          [Mod] Avoma

            Dat12 [Mojang] etanaratsastaja
            Lord_Quadrato [Helper] Lord_Quadrato
            Votes:
            50 Vote for this issue
            Watchers:
            19 Start watching this issue

              Created:
              Updated:
              Resolved:
              CHK: