Mojira Archive
MC-138089

Crossbow arrow inventory (ChargedProjectiles) not counting properly

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

Works As Intended

Matthew North

[Mojang] Cory Scheviak

2018-10-26, 09:50 PM

2019-03-04, 05:52 PM

2019-03-04, 05:52 PM

2

2

Confirmed

Minecraft 18w43c, Minecraft 18w48a, Minecraft 18w48b, Minecraft 18w49a

-