minecraft:inventory for you with a switch.Get GodCraftOverview
minecraft:inventory is an entity component: it goes in the components object of a custom mob, or in one of its component groups. Gives the entity an inventory that can hold items, like a chest on a donkey or a minecart.
Fields
| Field | Type | Default | Description |
|---|---|---|---|
additional_slots_per_strength | Integer | "0" | Extra slots gained for each point of strength. |
can_be_siphoned_from | Boolean | "false" | Lets hoppers pull items out of it. |
container_type | String | "none" | Kind of container screen, such as horse, inventory, container or hopper. |
inventory_size | Integer | "5" | Number of slots. |
private | Boolean | "false" | If true, items are not dropped when the entity dies. |
restrict_to_owner | Boolean | "false" | Only the owner can open the inventory. |
Example
Inside the components object of BP/entities/<name>.json (values are the defaults or placeholders):
BP/entities/<name>.json
{
"minecraft:inventory": {
"additional_slots_per_strength": "0",
"can_be_siphoned_from": "false",
"container_type": "none",
"inventory_size": "5",
"private": "false",
"restrict_to_owner": "false"
}
}