
Declarative UI
Adds data-driven UI, like GUIs and Commands, fully server-side.
Screenshots

About this Mod
Declarative UI
A data-driven UI mod for Minecraft using Fabric, making creation of GUIs easier and creating commands possible within a datapack.
No need to learn Java or Kotlin.
Containers also exist, so you could try making a sell gui, etc.
📖 Usage
To create a datapack, you can use /datapack create <id> <description>. You'll find it in your world's datapacks folder.
To create a GUI, which also allows customized slot actions and titles, create a JSON file within its data/<namespace>/declarative_ui/menu folder you'll create. For the format of the JSON, check the Menu Generator
To create a Command, with or without parameters, follow previous steps but put the JSON within data/<namespace>/declarative_ui/command and check the Command Generator for the format.
To create a container, create a JSON file within data/<namespace>/declarative_ui/container and put a number greater than 0 in a size field.
To handle a custom click action, create a JSON file within data/<namespace>/declarative_ui/custom_click_action and put a function path in a function field.
📖 Extra Commands
- Use
/item (modify|replace) containerfor command modification of player stored containers - Use
/declarative_ui open <targets> <menu>to open a menu /execute if container
📖 Loot Tables
- In 1.21.11+ you can choose the
declarative_ui:containerslot source in a slot entry
You can also download the .mcdoc and commands.json files for Spyglass here:
https://cdn.modrinth.com/data/5UTWPtx3/versions/ACQaQoYf/spyglass.zip?mr_download_reason=standalone
Available Versions
How to Install Declarative UI on Your Server
Order Server
Order a Minecraft Java server with at least 3 GB RAM (4 GB recommended).
Set fabric Loader
In the panel under "Egg", select the fabric loader and matching Minecraft version (26.2).
Install Mod
Open the mod browser in the dashboard and search for "Declarative UI". Click "Install" – done! Alternatively, upload the .jar via SFTP to the /mods folder.
Compatibility
Mod Loaders
Minecraft Versions
26.2, 26.1.2, 26.1.1 (+2 more)
Server-side
✓ RequiredRecommended RAM
4 GB(min. 3 GB)Frequently Asked Questions
Declarative UI server crashes on startup – what to do?
Most common cause: wrong fabric version or insufficient RAM. Check the server log (latest.log) for "OutOfMemoryError" or "Mixin" errors. With Mado Hosting: ensure at least 3 GB RAM is allocated and the loader matches the mod version (26.2). You can switch loaders with one click in the panel.
Is Declarative UI compatible with fabric?
Declarative UI officially supports fabric for Minecraft 26.2, 26.1.2, 26.1.1. The Mado dashboard automatically detects incompatible loader combinations.
Server lagging with Declarative UI – how to optimize performance?
Recommended RAM: 4 GB (per 8 players). Use /spark profiler to check if Declarative UI consumes the most tick time. Common fixes: reduce server view-distance to 8-10, install "performant" or "starlight" as supplementary mods on Forge. With Mado Hosting, your server runs on NVMe SSDs with dedicated CPU cores for minimal latency.
Similar Mods
Rent Modded Server
Install Declarative UI with just one click on your server.