Overview
The GUI extension provides a modular layout system for creating inventory menus. Instead of manually placing items at fixed slots, you define a tree of layouts that the engine assembles at runtime. Layouts nest like Russian dolls — aScrollableLayout wraps a SimpleLayout, a CompositeLayout combines multiple children, etc.
Core Concepts
| Concept | Description |
|---|---|
| MenuDefinition | The complete GUI definition: type (CHEST, ANVIL…), title, size, root layout, audio |
| MenuLayout | Abstract node in the layout tree — produces GuiSlot items for a viewport |
| layoutPool | JSON array of named layouts, referenced by mainLayoutId |
| mainLayoutId | ID of the root layout to display |
| Viewport | Visible area (default 9×6 for a double chest). Scrollable layouts have larger virtual sizes |