minecraft:shareables for you with a switch.Get GodCraftOverview
minecraft:shareables is an entity component: it goes in the components object of a custom mob, or in one of its component groups. Lists items the mob likes to pick up and share with others of its kind, like villagers passing food to each other.
Fields
| Field | Type | Default | Description |
|---|---|---|---|
all_items | Boolean | "false" | If true, the mob also wants every item not on the list, with the lowest priority. |
all_items_max_amount | Integer | "-1" | Most of those other items the mob will carry. |
all_items_surplus_amount | Integer | "-1" | How many of those items count as extra that it is happy to give away. |
all_items_want_amount | Integer | "-1" | How many of those items the mob wants to hold. |
items | List | none | Items or item tags the mob cares about, checked from top to bottom so the first match wins. |
singular_pickup | Boolean | "false" | If true, the mob only picks up one of an item it already has. |
Example
Inside the components object of BP/entities/<name>.json (values are the defaults or placeholders):
BP/entities/<name>.json
{
"minecraft:shareables": {
"all_items": "false",
"all_items_max_amount": "-1",
"all_items_surplus_amount": "-1",
"all_items_want_amount": "-1",
"items": {},
"singular_pickup": "false"
}
}