minecraft:storage_item for you with a switch.Get GodCraftOverview
minecraft:storage_item is an item component: it goes in the components object of a custom item. Lets the item carry other items inside it, like a bundle. Other components, such as minecraft:bundle_interaction, use this storage.
It is experimental: it only works in worlds with the matching experiment turned on, and it may change in future versions.
Fields
| Field | Type | Default | Description |
|---|---|---|---|
max_slots | integer | 64 | How many different stacks can be stored, up to 64.Range: … to 64 |
allow_nested_storage_items | boolean | true | When false, other storage items (like bundles) cannot be put inside. |
banned_items | Item Descriptor[] | none | Items that may never be put inside. |
allowed_items | Item Descriptor[] | none | If set, only these items may be put inside. Leave it empty to allow everything. |
Example
Inside the components object of BP/items/<name>.json (values are the defaults or placeholders):
BP/items/<name>.json
{
"minecraft:storage_item": {
"max_slots": 64,
"allow_nested_storage_items": true,
"banned_items": [],
"allowed_items": []
}
}