Edit

Share via


Items Documentation - minecraft:shooter

Compels an item to shoot projectiles, similarly to a bow or crossbow. Must have the minecraft:use_modifiers component in order to function properly.

Note

Ammunition used by minecraft:shooter must have the minecraft:projectile component in order to function properly.

Note

Items equipped with the shooter component will only sustain damage while shooting. Durability will remain unaffected if the item is used for melee attacks.

Note

Requires the following component in order to work properly:

Shooter Properties

Name Default Value Type Description Example Values
ammunition not set Array of Ammunition items Ammunition. My Sword Shoot: [{"item":"minecraft:snowball","use_offhand":true,"search_inventory":true,"use_in_creative":true}]
charge_on_draw not set Boolean true/false Charge on draw? Default is set to false.
max_draw_duration not set Decimal number Draw Duration. Default is set to 0. My Sword Shoot: 1
scale_power_by_draw_duration not set Boolean true/false Scale power by draw duration? Default is set to false. My Sword Shoot: true

Ammunition item type

Ammunition Properties

Name Default Value Type Description Example Values
item not set String Ammunition item description identifier.
item (Alternate 1) not set Keyed set of strings
search_inventory not set Boolean true/false Can search inventory? Default is set to false.
use_in_creative not set Boolean true/false Can use in creative mode? Default is set to false.
use_offhand not set Boolean true/false Can use off-hand? Default is set to false.

Samples

"minecraft:shooter": {
  "ammunition": [
    {
      "item": "custom_projectile",
      "use_offhand": true,
      "search_inventory": true,
      "use_in_creative": true
    }
  ],
  "max_draw_duration": 1,
  "scale_power_by_draw_duration": true,
  "charge_on_draw": false
}

My Sword Shoot

"minecraft:shooter": {
  "ammunition": [
    {
      "item": "minecraft:snowball",
      "use_offhand": true,
      "search_inventory": true,
      "use_in_creative": true
    }
  ],
  "max_draw_duration": 1,
  "scale_power_by_draw_duration": true,
  "charge_on_draw": false
}