How to Make a GUI in Minecraft (Mod Maker guide)
Learn how to create a custom GUI displayable panel with buttons, labels, and slots using 9Minecraft Mod Maker directly in your web browser with no installation needed.
Open the Studio and a workspace
Open 9Minecraft Mod Maker directly in your web browser. Since it runs online, there is nothing to download or install.
Create a new workspace or open an existing project. Make sure your workspace is set to one of the supported versions for a GUI element, which are NeoForge 26.1.2 or NeoForge 1.21.1.
Add the GUI element
Look for the green plus button in your workspace and click it to add a new mod element.
Go to the Interface & effects group and select GUI. A GUI is a displayable panel where you can place elements like buttons, labels, and slots.
Add labels and tooltips
To show text on your panel, use the Label text field to define what words appear when the GUI is open. You can also use a string return type procedure for more complex texts. If you only want the label to appear at certain times, set the Label display condition.
For extra help text, fill in Tooltip text so players see a message when hovering over the area covered by the component. You can control when it shows using the Tooltip display condition.
Set up buttons, checkboxes, and sliders
When adding a button, link a procedure to On button clicked so something happens when a player presses it. You can hide or show the button by setting the Button display condition.
If you include a checkbox, set the Checkbox procedure value to determine whether to initially check the box when the GUI is opened. For a slider, set When slider moves to trigger a procedure when the slider is selected and the cursor moves.
Add images, sprites, and entity models
You can decorate your panel with pictures and control when they appear using Image display condition. For sprites, set the Sprite count to specify the number of sprites in your selected texture, pick which one to show with Sprite index (starting from 0), and optionally set a Sprite display condition.
To show a character or creature, use Entity model and pick a procedure that returns an entity. Adjust its size with Entity model scale and set its initial yaw in degrees with Entity model rotation. Check Entity model follow mouse if you want it to rotate toward the cursor, and use Entity model display condition to control its visibility.
Configure item slots
If your GUI holds items, you can control how players use the slots. Set Slot placement condition to block players from putting items inside if the condition returns true, or set Slot pickup condition to stop players from taking items out if the condition returns true.
You can also run procedures when items move. Use When slot changed or When slot item taken to trigger a procedure when an item is put into or taken from the slot, and use When transferred from slot for when items are transferred out.
Set up GUI panel triggers
You can make your GUI run procedures automatically based on what the panel itself is doing.
Use When this GUI is opened to trigger a procedure right as it opens, GUI open tick to trigger a procedure every tick while it stays open, and When this GUI is closed to trigger a procedure when the player closes it.
Test with Build & run and export
Once your GUI panel is ready, save the element. Click the Build & run button in the studio to test your new interface and make sure all buttons, labels, and slots work as expected.
When you are happy with how your GUI looks and works, export your mod from the workspace to use it in Minecraft.
Tips
- When setting the Sprite index, remember that the counting starts at 0 and goes up to your Sprite count minus 1.
- Be careful not to use overly large numbers in Entity model rotation, as larger values may cause rendering issues due to render engine limitations.
- Keep in mind that setting a Slot placement condition overrides the Limit stack input parameter, while still allowing players to take items out without restriction.
- If you want Label text to change dynamically while playing, connect it to a procedure that returns a string instead of typing fixed words.