====== minecraft:shooter ====== The ''minecraft:shooter'' item component allows this item to shoot projectiles. Note that using an item with this component automatically uses it indefinitely, so defining the [[items:item_components:use_duration]] item component is not necessary. ===== Fields ===== ^ Name ^ Description ^ Type ^ Default Value ^ | ''held_ammunition'' | The ammunition to look for in the other hand. | An item tag | | | ''ammunition'' | The ammunition to look for in the inventory if it fails to find held ammunition. | An item tag | | | ''range'' | The visible range for mobs to shoot a target entity. | A positive integer | | | ''chargeable'' | Determines whether the shooter is chargeable or not. | An optional [[#chargeable_shooters|chargeable shooter]] instance | | ===== Example ===== { "held_ammunition": "minecraft:bow_ammunition", "ammunition": "minecraft:bow_ammunition", "range": 15 } ===== Chargeable Shooters ===== Enables a shooter item to be chargeable, and holds the data to use for them. ==== Fields ==== ^ Name ^ Description ^ Type ^ Default Value ^ | ''quick_charge_sounds'' | The sound events to use for the [[mc>Quick_Charge|Quick Charge]] enchantment. | A [[#quick_charge_sounds|Quick Charge sounds]] instance | | ==== Example ==== { "quick_charge_sounds": { "default": "minecraft:item.crossbow.loading_start", "levels": [ "minecraft:item.crossbow.quick_charge_1", "minecraft:item.crossbow.quick_charge_2", "minecraft:item.crossbow.quick_charge_3" ] } } ===== Quick Charge Sounds ===== Defines the sounds to use for the Quick Charge enchantment. ==== Fields ==== ^ Name ^ Description ^ Type ^ Default Value ^ | ''levels'' | The sound events to use for each level of the Quick Charge enchantment. | A list of [[mc>Sounds.json#Sound_events|sound events]] | | | ''default'' | The sound event to use for levels that are outside the range of ''levels''. | A [[mc>Sounds.json#Sound_events|sound event]] | | ==== Example ==== { "levels": [ "minecraft:item.crossbow.quick_charge_1", "minecraft:item.crossbow.quick_charge_2", "minecraft:item.crossbow.quick_charge_3" ], "default": "minecraft:item.crossbow.loading_start" }