跳转至

Pickup Items

文档版本:1.21.0.24

Allows the mob to pick up items on the ground.

架构

pickup_items:
{
  priority "priority"
  speed_multiplier "speed_multiplier"
  boolean "can_pickup_any_item" : opt
  boolean "can_pickup_to_hand_or_equipment" : opt
  number "cooldown_after_being_attacked" : opt
  array "excluded_items" : opt
  {
    descriptor "<any array element>"
  }
  number "goal_radius" : opt
  number "max_dist" : opt
  number "search_height" : opt
  boolean "pickup_based_on_chance" : opt
  boolean "pickup_same_items_as_in_hand" : opt
  boolean "track_target" : opt
}
prioritypriority
priority:
integer
speed_multiplierspeed_multiplier
speed_multiplier:
number
can_pickup_any_itemboolean
If true, the mob can pickup any item.
can_pickup_to_hand_or_equipmentboolean
If true, the mob can pickup items to its hand or armor slots.
cooldown_after_being_attackednumber
Amount of time an offended entity needs before being willing to pick up items.
excluded_itemsarray
List of items this mob will not pick up.
excluded_items
<any array element>descriptor
identifier:
string
descriptor:
{
  identifier "item"
  object "item" : opt
  {
  }
  0 "tags"
  string "item_tag" : opt
}
itemidentifier
itemobject
An object that describes an item.
item
tags0
[UNDOCUMENTED] A Molang expression ran against item or block to match.
0:
string
item_tagstring
[UNDOCUMENTED] A tag to lookup item or block by.
descriptor:
{
  identifier "item"
  object "item" : opt
  {
    identifier "item"
    object "item" : opt
    {
    }
    0 "tags"
    string "item_tag" : opt
  }
}
itemidentifier
itemobject
An object that describes an item.
item
goal_radiusnumber
Distance in blocks within the mob considers it has reached the goal. This is the wiggle room to stop the AI from bouncing back and forth trying to reach a specific spot.
max_distnumber
Maximum distance this mob will look for items to pick up.
search_heightnumber
Height in blocks the mob will look for items to pick up.
pickup_based_on_chanceboolean
If true, depending on the difficulty, there is a random chance that the mob may not be able to pickup items.
pickup_same_items_as_in_handboolean
If true, the mob will pickup the same item as the item in its hand.
track_targetboolean
If true, this mob will chase after the target as long as it's a valid target.