跳转至

Shooter

文档版本:1.21.0.24

Shooter Item Component.

架构

minecraft:shooter:
{
  array "ammunition" : opt
  {
    object "<any array element>" : opt
    {
      string "item" : opt
      boolean "use_offhand" : opt
      boolean "search_inventory" : opt
      boolean "use_in_creative" : opt
    }
  }
  boolean "charge_on_draw" : opt
  number "max_draw_duration" : opt
  boolean "scale_power_by_draw_duration" : opt
}
ammunitionarray
Ammunition.
ammunition
<any array element>object
Ammunition definition
<any array element>
itemstring
Item identifier
use_offhandboolean
If ammo can be in offhand
search_inventoryboolean
If ammo can be stored in the inventory
use_in_creativeboolean
If it needs ammo to be used in creative
charge_on_drawboolean
Charge on draw? Default is set to false.
max_draw_durationnumber
Draw Duration. Default is set to 0.
scale_power_by_draw_durationboolean
Scale power by draw duration? Default is set to false.