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

Crossbow arrow inventory (ChargedProjectiles) not counting properly

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Works As Intended
    • None
    • Minecraft 18w43c, Minecraft 18w48a, Minecraft 18w48b, Minecraft 18w49a
    • None
    • Confirmed

      The bug

      In the crossbow NBT data there is a list called ChargedProjectiles that stores the types of arrows as well as the amount of arrows. Normally (without the multishot enchantment) when the crossbow is loaded it'll look like

      ChargedProjectiles:[{id:"minecraft:arrow",Count:1b}]
      

      and with the multishot enchantment it'll look like

      ChargedProjectiles:[{id:"minecraft:arrow",Count:1b}],{id:"minecraft:arrow",Count:1b}],{id:"minecraft:arrow",Count:1b}]
      

      However if you were to change the Count byte to a higher number it'll act just like if there was one arrow.

      Example: If I were to set the Count tag to 7 and shoot an arrow I'd expect the Count tag would decrease by one and goto six. However instead the entire ChargedProjectiles list is simply emptied.

      How to reproduce

      1. Type in the command below to get a crossbow with a count of 5 arrows
        /replaceitem entity @s weapon crossbow{ChargedProjectiles:[{id:"arrow",Count:5b}],Charged:1b}
        
      2. Shoot it once
      3. Try to shoot it again
        The crossbow is empty instead of containing the remaining 4 arrows

            cojomax99 [Mojang] Cory Scheviak
            mattmotor Matthew North
            Votes:
            2 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved:
              CHK: