minecraft:trusting for you with a switch.Get GodCraftOverview
minecraft:trusting is an entity component: it goes in the components object of a custom mob, or in one of its component groups. Lets players earn the mob's trust by giving it certain items, like feeding fish to an ocelot.
Fields
| Field | Type | Default | Description |
|---|---|---|---|
probability | Decimal | "1.00" | Chance of gaining trust on each item use, from 0.0 to 1.0 (1.0 always works). |
trust_event | String | none | Event to run when the mob starts trusting the player. |
trust_items | List | none | Items that can earn the mob's trust. |
Example
Inside the components object of BP/entities/<name>.json (values are the defaults or placeholders):
BP/entities/<name>.json
{
"minecraft:trusting": {
"probability": "1.00",
"trust_event": "",
"trust_items": {}
}
}