跳转至

Shareables

文档版本:1.21.0.24

Defines a list of items the mob wants to share or pick up. Each item must have the following parameters:

架构

shareables:
{
  boolean "all_items" : opt
  integer "all_items_max_amount" : opt
  integer "all_items_surplus_amount" : opt
  integer "all_items_want_amount" : opt
  array "items" : opt
  {
    object "<any array element>" : opt
    {
      boolean "admire" : opt
      boolean "barter" : opt
      boolean "consume_item" : opt
      string "craft_into" : opt
      identifier "item"
      integer "item_aux" : opt
      integer "max_amount" : opt
      integer "pickup_limit" : opt
      integer "priority" : opt
      boolean "stored_in_inventory" : opt
      integer "surplus_amount" : opt
      integer "want_amount" : opt
      boolean "pickup_only" : opt
    }
  }
  boolean "singular_pickup" : opt
}
all_itemsboolean
A bucket for all other items in the game. Note this category is always least priority items.
all_items_max_amountinteger
Maximum number of this item the mob will hold.
all_items_surplus_amountinteger
Number of this item considered extra that the entity wants to share.
all_items_want_amountinteger
Number of this item this entity wants to share.
itemsarray
List of items that the entity wants to share.
items
<any array element>object
An Item that the entity wants to share.
<any array element>
admireboolean
Mob will admire the item after picking up by looking at it. For this to happen the mob needs to have an Admire component and an Admire goal.
barterboolean
Mob will barter for the item after picking it up. For this to work the mob needs to have a Barter component and a Barter goal.
consume_itemboolean
Determines whether the mob will consume the item or not.
craft_intostring
Defines the item this entity wants to craft with the item defined above. Should be an item name.
itemidentifier
The name of the item.
identifier:
string
item_auxinteger
Aux value for the item.
max_amountinteger
Maximum number of this item the mob will hold.
pickup_limitinteger
Maximum number of this item the mob will pick up during a single goal tick.
priorityinteger
Prioritizes which items the entity prefers. 0 is the highest priority.
stored_in_inventoryboolean
Determines whether the mob will try to put the item in its inventory if it has the inventory component and if it can't be equipped.
surplus_amountinteger
Number of this item considered extra that the entity wants to share.
want_amountinteger
Number of this item this entity wants to have.
pickup_onlyboolean
Determines whether the mob can only pickup the item and not drop it.
singular_pickupboolean
Determines whether the mob can only pickup one item at a time.