1. Wiki
  2. /Entities
  3. /minecraft:trusting

minecraft:trusting

Don't want to write this by hand? GodCraft sets minecraft:trusting for you with a switch.Get GodCraft

Overview

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

FieldTypeDefaultDescription
probabilityDecimal"1.00"Chance of gaining trust on each item use, from 0.0 to 1.0 (1.0 always works).
trust_eventStringnoneEvent to run when the mob starts trusting the player.
trust_itemsListnoneItems 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": {}
  }
}

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