跳转至

minecraft:ageable

文档版本:1.21.0.24

Adds a timer for the entity to grow up. It can be accelerated by giving the entity the items it likes as defined by feedItems.

架构

minecraft:ageable:
{
  array "drop_items" : opt
  {
    string "<any array element>" : opt
  }
  array "feed_items" : opt
  {
    object "<any array element>" : opt
    {
      string "item" : opt
      number "growth" : opt
    }
    string "<any array element>" : opt
  }
  number "duration" : opt
  string "transform_to_item" : opt
  entity_filters "interact_filters"
  object "grow_up" : opt
  {
    string "target" : opt
    string "event" : opt
  }
}
drop_itemsarray
List of items that the entity drops when it grows up.
drop_items
<any array element>string
feed_itemsarray
List of items that can be fed to the entity. Includes 'item' for the item name and 'growth' to define how much time it grows up by
feed_items
<any array element>object
<any array element>
itemstring
growthnumber
<any array element>string
durationnumber
Amount of time before the entity grows up, -1 for always a baby.
transform_to_itemstring
The feed item used will transform to this item upon successful interaction. Format: itemName:auxValue
interact_filtersentity_filters
List of conditions to meet so that the entity can be fed.
entity_filters:
{
  sub_filter "any_of"
  sub_filter "all_of"
  sub_filter "none_of"
}
any_ofsub_filter
sub_filter:
{
  string "test" : opt
  string "subject" : opt
  string "operator" : opt
  string "value" : opt
}
teststring
subjectstring
operatorstring
valuestring
sub_filter:
array
{
  object "<any array element>" : opt
  {
    string "test" : opt
    string "subject" : opt
    string "operator" : opt
    string "value" : opt
  }
}
<any array element>object
<any array element>
teststring
subjectstring
operatorstring
valuestring
all_ofsub_filter
none_ofsub_filter
grow_upobject
Event to run when this entity grows up.
grow_up
targetstring
eventstring