GUI Utilities Intro
The GUI Utilities extension is a powerful tool for creating and displaying Minecraft GUIs. This guide walks you through the basics.
Prerequisite: It is essential to be familiar with Typewriter. If not, please check the official Typewriter documentation first.
What is a GUI? A GUI (Graphical User Interface) refers to any visual interface beyond text, such as inventories or the advancement menu.
If youโre using the Entity Extension, some features of GUI Utilities may seem familiarโbut itโs not required.
Creating a Crafting Table GUI
Section titled โCreating a Crafting Table GUIโLetโs create a Crafting Table GUI to display the crafting recipe of a diamond sword.
Step 1: Define the Crafting Table GUI
Section titled โStep 1: Define the Crafting Table GUIโ- Create a Crafting Table Definition.
- Set its title to
Diamond Sword Recipe
.
Step 2: Opening the GUI
Section titled โStep 2: Opening the GUIโTo open the GUI, use the open GUI
action entry. Weโll trigger it with a detect command:
Now, link the GUI Definition to the Open GUI Entry:
Step 3: Testing the GUI
Section titled โStep 3: Testing the GUIโ- Publish your changes.
- Run
/opengui
in-game. - The GUI should now open with the correct title, but itโs still empty.
Adding Items to the GUI
Section titled โAdding Items to the GUIโ- Create a Crafting Table Items entry.
- Click โ to add an item.
- Select the correct slot from the dropdown.
- Add the desired item.
Repeat for every item in the recipe.
Step 4: Connecting Items to the Definition
Section titled โStep 4: Connecting Items to the DefinitionโLink the items data to the GUI Definition so Typewriter knows which GUI they belong to.
Test Again: Publish and run
/opengui
and now the items should appear inside the GUI!
Preventing Item Removal
Section titled โPreventing Item RemovalโTo stop players from taking items out of the GUI:
- Disable
allow click
in the definition settings.
Next Steps
Section titled โNext StepsโIn the next guide, youโll learn how to make item clicks trigger other entries, such as starting a dialogue sequence.
Stay tuned!