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

Insufficient ammo on custom enchantments glitches the item

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Unresolved
    • None
    • 24w20a, 1.21.1, 24w35a
    • None
    • Community Consensus
    • Enchantments
    • Low
    • Platform

      Description:

      Even though the enchantment ammo use value is bigger than the amount of ammo item in inventory, the player can still use the item. The weapon cannot shoot any arrows as expected. However, the shooting and drawing sounds are still played and crossbow gets stuck in the fully charged model.

      This is related to MC-271566.

      Steps to reproduce:
      1) Download the example test_datapack.zipdata pack and put it on your world.

      2) Grab a bow/crossbow and enchant it with this command:

      /enchant @s test_datapack:test_enchantment 5
      

      3) Get 1 arrow and switch to survival mode.

      4) Try to shoot with the item. Observe that it is still usable.

      Here is a video that summarizes the issue: bug.mp4

      Expected Result ✅:

      • The item shouldn't be usable.

      Observed Result ❌:

      The item is still usable and causes animation issues.

        1. bug.mp4
          9.12 MB
          Wyvernity
        2. Confirmed..mp4
          3.81 MB
          BugTracker

            Unassigned Unassigned
            Wyvernity Wyvernity
            Votes:
            1 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              CHK: