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. 2024-05-05_00.21.33.png
          373 kB
          Wyvernity
        2. 2024-05-05_00.22.05.png
          442 kB
          Wyvernity
        3. Confirmed..mp4
          3.03 MB
          BugTracker
        4. crash-2024-05-05_00.22.46-server.txt
          5 kB
          Wyvernity
        5. deobf_crash-2024-05-04_21.07.09-server.txt
          9 kB
          [Bot] Arisa
        6. error.png
          13 kB
          Wyvernity
        7. image-2024-05-05-01-00-10-763.png
          15 kB
          BugTracker

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

              Created:
              Updated:
              Resolved:
              CHK: