GooeyLibs Mod (1.21.4, 1.20.1) – Simplify UI Design
GooeyLibs Mod (1.21.4, 1.20.1) is a versatile and essential library mod for Minecraft, designed to facilitate the creation of user interfaces (UIs) for existing game screens on both Forge (NeoForge) and Fabric platforms. This mod serves as a powerful tool for mod developers, enabling them to enhance and customize the front-end UIs of their mods efficiently.
![]()
Features:
- Provides a comprehensive library for creating custom UIs in Minecraft.
- Compatible with both Forge and Fabric modding platforms.
- Includes pre-built components and templates for easy integration.
- Highly customizable to match the aesthetic and functional needs of mods.
Button represents an item on a Gooey page and defines what happens when the item is clicked. Buttons can be reused across multiple pages.
- GooeyButton
- Default button implementation in GooeyLibs.
- Configurable for:
- Display: which
ItemStackthe button shows. - Title: text shown as the button name.
- Lore: additional description lines.
- onClick: behavior executed when the button is clicked.
- Display: which
- Example:
Button button = GooeyButton.builder() .display(new ItemStack(Items.DIAMOND)) .title("Hello") .lore(Arrays.asList("Line 1", "Line 2")) .onClick(() -> doStuff()) .build();
- ButtonAction
- Created every time a button is clicked.
- Passed to the button’s click handler to provide context:
- Which player interacted.
- Where in the interface it was clicked.
- How it was interacted with.
Template defines the layout of buttons in a user interface. It is responsible for arranging buttons to make a page interactive.
- General role
- Stores button placement on the UI.
- Can hold many buttons for complex layouts.
- Provides convenience methods for quickly building interfaces.
- Gooey 2.0 includes several interface types beyond simple chests.
- ChestTemplate
- Represents a chest-like grid layout with a fixed number of rows.
- Builder methods:
- set(row, column, button): place a button at an exact slot.
- row(index, button): fill an entire row with a button.
- fill(button): fill all remaining empty slots.
- Example:
GooeyButton diamond = GooeyButton.builder() .display(new ItemStack(Items.DIAMOND)) .build(); GooeyButton emerald = GooeyButton.builder() .display(new ItemStack(Items.EMERALD)) .build(); GooeyButton dirt = GooeyButton.builder() .display(new ItemStack(Blocks.DIRT)) .build(); ChestTemplate template = ChestTemplate.builder(6) .set(0, 0, diamond) .row(1, emerald) .fill(dirt) .build();
Page defines a complete user interface that can be opened for a player. A page is built from templates and may react when it is opened or closed.
- Structure
- Must specify a main Template.
- May optionally specify an InventoryTemplate for the player inventory area.
- Default implementation: GooeyPage.
- Custom pages can be created by implementing the
Pageinterface.
- Creating a GooeyPage
- Example:
GooeyButton button = GooeyButton.builder() .display(new ItemStack(Items.DIAMOND)) .build(); ChestTemplate template = ChestTemplate.builder(6) .fill(button) .build(); GooeyPage page = GooeyPage.builder() .template(template) .build();
- Example:
- Sending a Page
- Use UIManager to open pages for players.
- Key methods:
- UIManager#openPageForcefully: immediately opens the page and closes any open container.
- UIManager#openPagePassively: waits for the current container to close before opening the page.
Requires:
How to install:
Click the following link to view details: How to Install Mods for Minecraft Java Edition on PC: A Beginner Guide
GooeyLibs Mod (1.21.4, 1.20.1) Download Links
For Minecraft 1.20.1, 1.20
Forge Version: Download from Server 1 – Download from Server 2
Fabric Version: Download from Server 1 – Download from Server 2
For Minecraft 1.21.4, 1.21.3, 1.21.1, 1.21
NeoForge Version: Download from Server 1 – Download from Server 2
Fabric Version: Download from Server 1 – Download from Server 2
0
3 weeks ago