items:item_components:shooter
Table of Contents
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 minecraft: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 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 Quick Charge enchantment. | A 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 sound events | |
default | The sound event to use for levels that are outside the range of levels . | A 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" }
items/item_components/shooter.txt · Last modified: 2024/04/19 15:27 by errorcraft