概览
minecraft:trusting 是一个实体组件:写在自定义生物的 components 对象中,或其中某个组件组里。 让玩家通过给生物特定物品来赢得它的信任,就像给豹猫喂鱼。
字段
| 字段 | 类型 | 默认值 | 说明 |
|---|---|---|---|
probability | Decimal | "1.00" | 每次使用物品获得信任的概率,范围 0.0 到 1.0(1.0 必定成功)。 |
trust_event | String | 无 | 生物开始信任玩家时运行的事件。 |
trust_items | List | 无 | 能赢得生物信任的物品。 |
示例
写在 BP/entities/<name>.json 的 components 对象中(值为默认值或占位值):
BP/entities/<name>.json
{
"minecraft:trusting": {
"probability": "1.00",
"trust_event": "",
"trust_items": {}
}
}