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

Game crash on insufficient "ammo_use" amount

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • 24w20a
    • 24w18a
    • None
    • Community Consensus
    • Crash
    • Important
    • Platform

      If the amount of ammo item in inventory is less than ammo count of the enchantment, the game crashes.

      Steps to reproduce:

      1) Download test_datapack.zip example data pack and put it on your world.

      2) Get a crossbow and enchant it with this command:

      /enchant @s test_datapack:test_enchantment 5

      3) Put 1 arrow in your inventory and switch to survival mode.

      4) Try to reload the crossbow. The game crashes.

       

      Expected Result:

      The crossbow shouldn't be reloadable and the game shouldn't crash.

       

      Observed Result:

      The game crashes.

       

      The related images and the crash log is attached.

        1. deobf_crash-2024-05-04_21.07.09-server.txt
          9 kB
        2. test_datapack.zip
          1 kB
        3. error.png
          error.png
          13 kB
        4. crash-2024-05-05_00.22.46-server.txt
          5 kB
        5. 2024-05-05_00.21.33.png
          2024-05-05_00.21.33.png
          373 kB
        6. 2024-05-05_00.22.05.png
          2024-05-05_00.22.05.png
          442 kB
        7. image-2024-05-05-01-00-10-763.png
          image-2024-05-05-01-00-10-763.png
          15 kB
        8. Confirmed..mp4
          3.03 MB

            gegy1000 [Mojang] Gegy
            Wyvernity Wyvernity
            Votes:
            5 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved:
              CHK: