Container profile format
A container profile tells inventory tools built on Stope how to treat one menu type: leave it alone, hide their buttons because the menu has its own, or split its slots into regions. A resource pack adds profiles for any mod’s menus, without that mod’s help.
Example
Section titled “Example”{ "menu": "mymod:sorter", "own_buttons": true, "regions": [ { "kind": "container", "first": 9, "last": 35 } ]}Where files go
Section titled “Where files go”- One file per menu type, in
assets/<namespace>/stope/container_profiles/, named anything ending in.json. The namespace need not be the menu’s. - Profiles reload with resource packs (F3+T).
- A pack’s profile replaces a mod’s profile for the same menu type.
- When two packs both have a profile for one menu type, the higher pack in the resource pack list wins.
- Between two mods’ own files for one menu type, which wins is not defined: give each menu type one file.
| Key | Type | Default | Meaning |
|---|---|---|---|
menu |
menu type ID | required | The menu type, such as minecraft:generic_9x3. |
excluded |
boolean | false |
Inventory tools leave this menu alone. |
own_buttons |
boolean | false |
The menu draws its own inventory buttons, so tools hide theirs. |
regions |
list of regions | none | Regions that replace the menu’s container slots. |
A region is an object:
| Key | Type | Default | Meaning |
|---|---|---|---|
kind |
region kind | container |
What the slots are. |
first |
slot index | required | The first menu slot, from 0. |
last |
slot index | required | The last menu slot, at or after first. |
- Region kinds are
player_main,hotbar,armor,offhand,crafting,result,container, andother, in any case. - A profile’s regions apply only to the menu’s container slots. Container slots no region
covers become
other. - For a menu type whose menus vary in size, such as a backpack with tiers, a mod can work out
each menu’s regions in code. A file’s
regionsare not used for such a menu type. - A file’s
excludedandown_buttonsapply whether or not itsregionsare used. - A key not in these tables, a value of the wrong type, an unknown kind, or
firstafterlastmakes the whole file fail. - A failed file logs one warning naming the file and why.
- A menu whose file failed keeps the profile it would have without that file.
See also
Section titled “See also”- Slot regions: how Stope sorts a menu’s slots before a profile applies.