1. Wiki
  2. /物品
  3. /minecraft:shooter

minecraft:shooter

不想手写?在 GodCraft 里打开一个开关,就能帮你设置好 minecraft:shooter。Get GodCraft

概览

minecraft:shooter 是一个物品组件:写在自定义物品的 components 对象中。 让物品成为像弓或弩一样的发射器,从物品栏中发射弹药。搭配 minecraft:use_modifiers,玩家才能按住拉弓。

字段

字段类型默认值说明
ammunitionAmmunition[]无可发射的物品列表,以及使用副手弹药或在创造模式下忽略弹药等选项。
max_draw_durationnumber0完全拉满所需的秒数。
scale_power_by_draw_durationbooleanfalse为 true 时,玩家拉得越久,射击越强。
charge_on_drawbooleanfalse为 true 时,物品在拉动时装填,并在下一次使用时发射,就像弩一样。

示例

写在 BP/items/<name>.json 的 components 对象中(值为默认值或占位值):

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

物品: 行为包

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