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

Game crashes when saving an entity's effect above 127

XMLWordPrintable

    • Confirmed
    • Commands, Crash
    • Very Important
    • Platform

      The game crashes when an entity with an effect level above 128 is saved. The following error is provided in the launcher afterwards:

      The game crashed whilst saving entity nbt
      Error: java.lang.IllegalStateException: Value 128 outside of range [0:127]
      

      Steps to Reproduce:

      1. Give the player an effect above 127
        /effect give @p minecraft:regeneration infinite 128 true
        
      2. Pause the game

      Expected & Observed Results:

      - The game crashes.
      - The effect would be saved properly, and the game would not crash.

      Screenshots/Videos:

      EffectCrash.mp4

      Notes:

      1. Not exclusive to the player.
      2. Crash log: deobf_crash-2024-01-31_11.05.26-server.txt

        1. deobf_crash-2024-01-31_11.05.26-server.txt
          6 kB
          [Bot] Arisa
        2. EffectCrash.mp4
          793 kB
          [Mod] Jiingy

            gegy1000 [Mojang] Gegy
            Jingy [Mod] Jiingy
            Votes:
            9 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved:
              CHK: