Shareables¶
文档版本:1.21.50.25
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_items
:boolean- A bucket for all other items in the game. Note this category is always least priority items.
all_items_max_amount
:integer- Maximum number of this item the mob will hold.
all_items_surplus_amount
:integer- Number of this item considered extra that the entity wants to share.
all_items_want_amount
:integer- Number of this item this entity wants to share.
items
:array- 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>
admire
:boolean- 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.
barter
:boolean- 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_item
:boolean- Determines whether the mob will consume the item or not.
craft_into
:string- Defines the item this entity wants to craft with the item defined above. Should be an item name.
item
:identifier- The name of the item.
item_aux
:integer- Aux value for the item.
max_amount
:integer- Maximum number of this item the mob will hold.
pickup_limit
:integer- Maximum number of this item the mob will pick up during a single goal tick.
priority
:integer- Prioritizes which items the entity prefers. 0 is the highest priority.
stored_in_inventory
:boolean- 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_amount
:integer- Number of this item considered extra that the entity wants to share.
want_amount
:integer- Number of this item this entity wants to have.
pickup_only
:boolean- Determines whether the mob can only pickup the item and not drop it.
singular_pickup
:boolean- Determines whether the mob can only pickup one item at a time.