跳转至

Trusting

文档版本:1.21.0.24

Defines the rules for a mob to trust players.

架构

trusting:
{
  number "probability" : opt
  event_object "trust_event"
  array "trust_items" : opt
  {
    identifier "<any array element>"
  }
}
probabilitynumber
The chance of the entity trusting with each item use between 0.0 and 1.0, where 1.0 is 100%
trust_eventevent_object
Event to run when this entity becomes trusting.
event_object:
{
  filters "filters"
  string "event" : opt
  string "target" : opt
}
filtersfilters
一个过滤器组
eventstring
The event to fire.
targetstring
The target of the event.
trust_itemsarray
The list of items that can be used to get the entity to trust players.
trust_items
<any array element>identifier
identifier:
string