1. Wiki
  2. /Items
  3. /minecraft:shooter

minecraft:shooter

Don't want to write this by hand? GodCraft sets minecraft:shooter for you with a switch.Get GodCraft

Overview

minecraft:shooter is an item component: it goes in the components object of a custom item. Makes the item a launcher, like a bow or crossbow, that fires ammo from the inventory. Pair it with minecraft:use_modifiers so the player can hold it to draw.

Fields

FieldTypeDefaultDescription
ammunitionAmmunition[]noneList of items it can fire, and options like using the off hand or ignoring ammo in Creative.
max_draw_durationnumber0Seconds needed to fully draw the item.
scale_power_by_draw_durationbooleanfalseWhen true, shots are stronger the longer the player draws.
charge_on_drawbooleanfalseWhen true, the item loads while drawing and fires on the next use, like a crossbow.

Example

Inside the components object of BP/items/<name>.json (values are the defaults or placeholders):

BP/items/<name>.json
{
  "minecraft:shooter": {
    "ammunition": [],
    "max_draw_duration": 0,
    "scale_power_by_draw_duration": false,
    "charge_on_draw": false
  }
}

Items: Behavior pack

We use cookies to improve your experience and analyse site traffic. Learn more