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

Crossbows take triple durability damage when using Multishot

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Unresolved
    • None
    • 1.16.5, 21w06a, 1.19.2
    • None
    • Confirmed
    • Enchantments

      Crossbows deal triple the damage (damage per projectile launched) when using multishot. This is documented on sites such as gamepedia however I believe this is unintentional behavior based on the way the code for crossbows is written.

      From what I can tell, there are two methods inside of ItemCrossbow that need to be examined for this issue. The first method iterates for the amount of stored projectiles and then calls another method. Let's call the first method "unloadCrossbow" and the second method "fireProjectile" for the sake of this report.

      The fireProjectile method does multiple things. It accepts an ItemStack and then converts it to a projectile. Then it proceeds to fire the projectile with the provided angle, force etc. Past this point it damages the crossbow which is fine however it also plays a sound effect here.

      Playing a sound effect here means it plays the shoot sound effect three times at once. It also damages the crossbow three times instead of three times the damage, at once. This also means that the unbreaking enchantment is checked three times for a single crossbow fire which doesn't make much sense. This can essentially be summed up to firing the crossbow three times at the same instant which seems like inconsistent behavior. This damaging and playing sound should instead be delegated to the "unloadCrossbow" method. 

      In short, the issue lies less with the dealing triple the damage (although I believe this to be unintentional), it's with how it is implemented and the inconsistent behavior that arises from it.

            Unassigned Unassigned
            DiamondDagger590 Coleman Yantis
            Votes:
            6 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              CHK: