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

minecraft:trusting

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

概览

minecraft:trusting 是一个实体组件:写在自定义生物的 components 对象中,或其中某个组件组里。 让玩家通过给生物特定物品来赢得它的信任,就像给豹猫喂鱼。

字段

字段类型默认值说明
probabilityDecimal"1.00"每次使用物品获得信任的概率,范围 0.0 到 1.0(1.0 必定成功)。
trust_eventString无生物开始信任玩家时运行的事件。
trust_itemsList无能赢得生物信任的物品。

示例

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

BP/entities/<name>.json
{
  "minecraft:trusting": {
    "probability": "1.00",
    "trust_event": "",
    "trust_items": {}
  }
}

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