Inventory
These types let a mod build inventory tools the same way on every loader: buttons beside a container screen, keys and clicks taken before vanilla, marks drawn on slots, key mappings players rebind in Controls, a menu’s slots sorted into regions, and click plans that rearrange a menu through the server’s own click handling. Resource-pack authors describe menus in the container profile format.
At a glance
Section titled “At a glance”| Type | Summary | Status | Since | Side | Thread |
|---|---|---|---|---|---|
Click |
One click on a menu slot. | Experimental | 2.10.0 | both | any |
ClickAction |
What a Click does, as vanilla’s click types do. |
Experimental | 2.10.0 | both | any |
ClickPlan |
Clicks to run, in order, on one open menu. | Experimental | 2.10.0 | both | any |
ClickPlanner |
Plans the clicks that rearrange a menu, as a player sorting by hand would click. | Experimental | 2.10.0 | both | any |
ClickPlanRoute |
A route that carries ClickPlans to the server as one packet each, for InventoryTransport. |
Experimental | 2.10.0 | both | setup |
ContainerClickCallback |
A mouse button pressed on a container screen, before vanilla handles it. | Experimental | 2.10.0 | client | render |
ContainerKeyCallback |
A key pressed on a container screen, before vanilla handles it. | Experimental | 2.10.0 | client | render |
ContainerProfile |
How inventory tools treat one menu type, registered with ContainerProfiles. |
Experimental | 2.10.0 | both | any |
ContainerProfiles |
Profiles of menu types, for inventory tools: which menus to leave alone, which draw their own buttons, and how a menu’s container slots split into regions. | Experimental | 2.10.0 | both | setup |
ContainerScreenInitCallback |
Lays out a mod’s widgets on a container screen. | Experimental | 2.10.0 | client | render |
ContainerScreens |
An open container screen’s menu image and hovered slot, and what its key events mean. | Experimental | 2.10.0 | client | render |
InventoryTransport |
Gets a ClickPlan to the server. |
Experimental | 2.10.0 | client | render |
KeyContext |
Where a key mapping applies. | Experimental | 2.10.0 | client | any |
KeyDefault |
A key mapping’s default binding. | Experimental | 2.10.0 | client | any |
KeyMappings |
Registers a mod’s key mappings. | Experimental | 2.10.0 | client | setup |
MappedKey |
A key mapping from KeyMappings#register. |
Experimental | 2.10.0 | client | render |
MenuRegions |
One menu’s slots, sorted by SlotRegions#of. |
Experimental | 2.10.0 | both | any |
MenuSnapshot |
A menu’s layout for ClickPlanner: each slot’s stack, numbered by kind, and what each slot allows. |
Experimental | 2.10.0 | both | any |
PlanStack |
A stack as ClickPlanner sees it. |
Experimental | 2.10.0 | both | any |
ProfileRegionFinder |
Finds a menu’s container regions when the menu is sorted, where a ContainerProfile names them by fixed slot indexes. |
Experimental | 2.11.0 | both | any |
ReplayLimits |
Limits on what a ClickPlanRoute replays for each player. |
Experimental | 2.10.0 | both | any |
ScreenWidgets |
Adds widgets to the screen a ContainerScreenInitCallback listener lays out. |
Experimental | 2.10.0 | client | render |
SlotOverlayCallback |
Draws over a container screen’s slots. | Experimental | 2.10.0 | client | render |
SlotRegion |
What a menu slot is for, as SlotRegions#of sorts them. |
Experimental | 2.10.0 | both | any |
SlotRegions |
Sorts a menu’s slots into regions for inventory tools: sorting, moving stacks, drawing buttons beside the right slots. | Experimental | 2.10.0 | both | any |
SlotRules |
What each slot of a menu allows, by slot index and PlanStack kind. |
Experimental | 2.10.0 | both | any |
TransportResult |
How a plan run by InventoryTransport ended. |
Experimental | 2.10.0 | client | render |