手冊:minecraft:attack

出自Minecraft基岩版开发Wiki
數據驅動 實體 > minecraft:attack_(實體元件)
minecraft:attack
附加包元件
元件所屬
元件型別
加入版本
?

設定實體的攻擊。

模式[編輯]

object "minecraft:attack" : opt
{
    range "damage"
    float "effect_duration"<0-*> : opt
    string "effect_name" : opt
}

結構[編輯]

  •  minecraft:attack:根物件。
    • *value:定義攻擊傷害的取值範圍。為數字型別時同時定義最小值和最大值;為陣列型別時第一個元素定義最小值,第二個元素定義最大值。
    •  effect_duration:定義所賦予的狀態效果的持續時間,以秒為單位。預設值為0.0。
    •  effect_name:定義賦予受攻擊實體的狀態效果型別

列舉值[編輯]

狀態效果[編輯]

生物效果列表
鍵名 介面字串 實驗性玩法 有害 顏色 粒子 圖示索引 描述
資源名稱 元件名稱 描述ID
EMPTY_EFFECT 0 empty minecraft:effect.empty 空字串 N/A
 #385DC6
0 空效果
MOVEMENT_SPEED 1 speed minecraft:effect.speed potion.moveSpeed N/A
 #7CAFC6
0 速度
MOVEMENT_SLOWDOWN 2 slowness minecraft:effect.slowness potion.moveSlowdown N/A
 #5A6C81
1 緩慢
DIG_SPEED 3 haste minecraft:effect.haste potion.digSpeed N/A 挖掘加速
DIG_SLOWDOWN 4 mining_fatigue minecraft:effect.mining_fatigue potion.digSlowDown N/A 挖掘疲勞
DAMAGE_BOOST 5 strength minecraft:effect.strength potion.damageBoost N/A 力量
HEAL 6 instant_health minecraft:effect.instant_health potion.heal N/A 立即治療
HARM 7 instant_damage minecraft:effect.instant_damage potion.harm N/A 立即傷害
JUMP 8 jump_boost minecraft:effect.jump_boost potion.jump N/A 跳躍提升
CONFUSION 9 nausea minecraft:effect.nausea potion.confusion N/A 嘔心
REGENERATION 10 regeneration minecraft:effect.regeneration potion.regeneration N/A 回復
DAMAGE_RESISTANCE 11 resistance minecraft:effect.resistance potion.resistance N/A 抗性
FIRE_RESISTANCE 12 fire_resistance minecraft:effect.fire_resistance potion.fireResistance N/A 抗火
WATER_BREATHING 13 water_breathing minecraft:effect.water_breathing potion.waterBreathing N/A 水中呼吸
INVISIBILITY 14 invisibility minecraft:effect.invisibility potion.invisibility N/A 隱形
BLINDNESS 15 blindness minecraft:effect.blindness potion.blindness N/A 失明
NIGHT_VISION 16 night_vision minecraft:effect.night_vision potion.nightVision N/A 夜視
HUNGER 17 hunger minecraft:effect.hunger potion.hunger N/A 飢餓
WEAKNESS 18 weakness minecraft:effect.weakness potion.weakness N/A 虛弱
POISON 19 poison minecraft:effect.poison potion.poison N/A 中毒
WITHER 20 wither minecraft:effect.wither potion.wither N/A 凋零
HEALTH_BOOST 21 health_boost minecraft:effect.health_boost potion.healthBoost N/A 生命值提升
ABSORPTION 22 absorption minecraft:effect.absorption potion.absorption N/A 傷害吸收
SATURATION 23 saturation minecraft:effect.saturation potion.saturation N/A 飽食
LEVITATION 24 levitation minecraft:effect.levitation potion.levitation N/A 飄浮
FATAL_POISON 25 fatal_poison minecraft:effect.fatal_poison potion.poison N/A 中毒
CONDUIT_POWER 26 conduit_power minecraft:effect.conduit_power potion.conduitPower N/A 海靈能量
SLOW_FALLING 27 slow_falling minecraft:effect.slow_falling potion.slowFalling N/A 緩降
BAD_OMEN 28 bad_omen minecraft:effect.bad_omen potion.badOmen N/A 不祥之兆
HERO_OF_THE_VILLAGE 29 village_hero minecraft:effect.village_hero potion.villageHero N/A 村莊英雄
DARKNESS 30 darkness minecraft:effect.darkness potion.darkness N/A

範例[編輯]

"minecraft:attack": {
  "damage": 4,
  "effect_duration": 10.0,
  "effect_name": "wither"
}

歷史[編輯]

基岩版
?加入了minecraft:attack

錯誤[編輯]

關於minecraft:attack的錯誤在國際版中由錯誤追蹤器維護,請在此回報錯誤。