GUI
Forge GUI files live in gui/ and include the main forge GUI and the recipe book. The GUI protects input slots, handles clicks, returns items, and starts the forge process.
Files
| File | Purpose |
|---|---|
forge_gui.yml | Main forging interface. |
recipe_book.yml | Recipe book listing loaded recipes. |
Template structure
Templates use the CoreLib GUI template format. Top-level fields:
| Field | Type | Description |
|---|---|---|
id | string | Template id, matching the file name. |
gui_type | string | Container type. The forge interface uses CHEST. |
title | string | GUI title. Supports MiniMessage and the %recipe% replacement. |
rows | integer | Row count. The bundled forge_gui uses 5 rows and recipe_book uses 6. |
slots | map | Slot group definitions, keyed by group name. |
virtual_items | map | Dynamic display items that do not occupy a slot. |
texts | map | Status text fragments. |
Each slot group contains:
| Field | Type | Description |
|---|---|---|
slots | list<integer> | Inventory slot indices used by this group. |
type | string | Functional type. Omit it for a decorative slot. |
item | object | Default display item (source plus components). |
sounds | object | Click sound and related settings. |
Forge interface slot types
Functional slot types driven by type in forge_gui.yml:
| type | Purpose |
|---|---|
blueprint_inputs | Blueprint input slots. Forge matches the recipe by the blueprint item source. |
required_materials | Required material input slots. |
optional_materials | Optional material input slots, which consume forge capacity. |
capacity_display | Displays current capacity, capacity limit, and capacity state. |
confirm | Confirm button that starts forging. |
Slot groups without a type (top_frame, side_frame, and core_frame in the bundled template) are decorative filler only.
Recipe book slot types
Functional slot types driven by type in recipe_book.yml:
| type | Purpose |
|---|---|
recipe_list | Recipe entry display area. |
prev_page | Previous page. |
next_page | Next page. |
close | Close the menu. |
Slot group example
blueprint_inputs:
slots:
- 10
- 19
type: "blueprint_inputs"
item:
source: "guster_banner_pattern"
components:
custom_name: "<light_purple>Insert Blueprint</light_purple>"
lore:
- "<gray>The recipe is matched by blueprint item source"Confirm button example
confirm:
slots:
- 34
type: "confirm"
item:
source: "ANVIL"
components:
custom_name: "<green>Confirm Forging</green>"
lore:
- "<gray>Capacity: <yellow>%current%/%max%</yellow>"
- "<yellow>Click to start forging"
sounds:
click:
sound: "ui.button.click"
volume: 1.0
pitch: 1.0Capacity display variables
Available in the lore of the capacity_display and confirm slots:
| Variable | Description |
|---|---|
%current% | Currently used capacity. |
%max% | Capacity limit. |
%capacity_state% | Capacity state text, resolved from texts.capacity_state. |
texts.capacity_state supports four state keys: waiting (awaiting blueprint), overflow (over limit), warning (near limit), and normal.
Virtual items
virtual_items.confirm_blocked defines the display item that replaces the confirm button when capacity is exceeded:
virtual_items:
confirm_blocked:
item:
source: "BARRIER"
components:
custom_name: "<red>Cannot Forge</red>"
lore:
- "<gray>Capacity: <yellow>%current%/%max%</yellow></gray>"
- "<red>Optional material capacity exceeded</red>"Player experience tips
- Spell out what each slot accepts in the default display item lore of the blueprint and material slots.
- Use
texts.capacity_stateto clearly separate awaiting-blueprint, near-limit, and over-limit states. - When capacity is exceeded,
confirm_blockedreplaces the confirm button; state the fix directly in its lore. - Decorative slot groups separate functional areas. When adjusting the layout, avoid colliding with functional slot indices.