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

minecraft:healable

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

概览

minecraft:healable 是一个实体组件:写在自定义生物的 components 对象中,或其中某个组件组里。 让玩家给实体喂食或使用物品来恢复它的生命值,比如喂狼吃肉。

字段

字段类型默认值说明
filtersMinecraft Filter无治疗生效必须满足的条件。
force_useBoolean"false"即使实体已满血也能使用该物品。
itemsArray无可以治疗的物品,以及每种恢复的生命值和可选效果。

示例

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

BP/entities/<name>.json
{
  "minecraft:healable": {
    "filters": {},
    "force_use": "false",
    "items": {}
  }
}

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