1. Wiki
  2. /实体
  3. /minecraft:mob_effect

minecraft:mob_effect

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

概览

minecraft:mob_effect 是一个实体组件:写在自定义生物的 components 对象中,或其中某个组件组里。 给附近的实体施加药水效果,就像河豚让靠近的一切中毒。

字段

字段类型默认值说明
ambientBoolean"false"把效果当作信标效果处理,粒子更淡。
cooldown_timeInteger"0"两次施加效果之间等待的秒数。
effect_rangeDecimal"0.2"实体必须在多近(以方块计)才会获得效果。
effect_timeInteger"10"效果持续多少秒,或 "infinite"。
entity_filterMinecraft Filter无哪些实体可以获得效果。
mob_effectString无要施加的效果,比如 poison。

示例

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

BP/entities/<name>.json
{
  "minecraft:mob_effect": {
    "ambient": "false",
    "cooldown_time": "0",
    "effect_range": "0.2",
    "effect_time": "10",
    "entity_filter": {},
    "mob_effect": ""
  }
}

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