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

Crash while saving entity NBT - Cannot encode empty ItemStack

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • 1.21 Pre-Release 3, 24w33a
    • 1.21 Pre-Release 1, 1.21 Pre-Release 2, 1.21 Pre-Release 3, 1.21 Pre-Release 4, 1.21 Release Candidate 1, 1.21
    • None
    • Plausible
    • Crash
    • Important
    • Platform

      I was working on creating a trident that warps you to it's location when it hits the ground, but it takes damage over time when held and even more when thrown.

      I was using `warp.json` for the enchantment and `warp.mcfunction` for the function it calls.

      I enchanted a trident with "Warp", and threw it until it broke. It seemed to both break and throw at the same time when it was at 0 durability. When I went to go pick it up, nothing happened, couldn't pick it up, even in creative. I tried to make a new trident with the same enchantment and throw that next. The trident was able to be thrown but instead of applying the damage or running the function the game crashed.

      I have attached the enchantment file, `warp.json`, the function file, `warp.mcfunction`, and the crash report. Also, just in case I attached `warp_trident.json` which is the recipe function I was using to obtain the item.

      Oh and I know in the crash report it says "(incompatible)" for the datapacks, I think it's because I haven't changed the version number yet. They worked just fine up until this point.

        1. crash-2024-05-30_14.16.23-server.txt
          5 kB
          GetSirius55
        2. crash-2024-06-05_08.49.11-server.txt
          5 kB
          GetSirius55
        3. crash-2024-06-07_09.14.42-server.txt
          5 kB
          GetSirius55
        4. crash-2024-06-10_10.27.28-server.txt
          5 kB
          GetSirius55
        5. crash-2024-06-13_11.34.21-server.txt
          5 kB
          GetSirius55
        6. deobf_crash-2024-05-30_14.16.23-server.txt
          10 kB
          [Bot] Arisa
        7. deobf_crash-2024-06-07_09.14.42-server.txt
          10 kB
          [Bot] Arisa
        8. deobf_crash-2024-06-10_10.27.28-server.txt
          10 kB
          [Bot] Arisa
        9. deobf_crash-2024-06-13_11.34.21-server.txt
          10 kB
          [Bot] Arisa
        10. warp_trident.json
          0.6 kB
          GetSirius55
        11. warp.json
          3 kB
          GetSirius55
        12. warp.mcfunction
          0.7 kB
          GetSirius55

            gegy1000 [Mojang] Gegy
            GetSirius55 GetSirius55
            Votes:
            3 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved:
              CHK: