Back to mods
Declarative UI project artwork

Modrinth · Minecraft mod

Declarative UI

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

Choose a version Pick your version below, then grab the matching file.

Quick answer

Which Declarative UI release should I use?

Updated 2 months ago
Latest stable file 1.3+26.2
Game version 26.2
Loader Fabric

Declarative UI 1.3+26.2 targets 26.2 with Fabric. Do not install it on the client. It must be installed on the dedicated server. All 1 required mods have matching files.

Where it goes

Is Declarative UI required on the client, server, or both?

Do not install it on the client. It must be installed on the dedicated server.

Client Not supported
Dedicated server Required
Loader for this release Fabric
Required install it here Optional supported, not mandatory Not supported do not install here Source doesn’t say do not assume

This file is marked server-only.

What else does Declarative UI 1.3+26.2 need?

1.3+26.2. Change the file and its required mods may change too.

All 1 required mods have matching files

Install Fabric API first. We found matching files for this game-version and loader setup.

Fabric API Needed by Declarative UI 1.3+26.2
required
Matching file found Matched file: 0.159.0+26.2

We only count dependency files that match this setup. A file for another loader does not fill the gap.

Before you install it

Add Declarative UI without breaking your instance.

Built for Declarative UI 1.3+26.2. Pick another file and the loader, install side or required mods may change.

  1. 01

    Stick to this file

    Use 1.3+26.2. It targets 26.2 with Fabric; another release may have different loader, side or dependency requirements.

  2. 02

    Bring the mods it needs

    Install Fabric API first. We found matching files for this game-version and loader setup.

  3. 03

    Put it on the correct side

    Do not install it on the client. It must be installed on the dedicated server.

  4. 04

    Pick the file you checked

    Use the “Get this file” button beside 1.3+26.2. It opens that exact file at the source.

About this project

What does Declarative UI add?

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) container for 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:container slot 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

Project description from Modrinth.

Pick your setup

Declarative UI by Minecraft version and loader

Choose the version and loader you play, then open the matching release.

5 available setups

Check the dependencies, then try the file in a copied instance before changing a world you care about.

Recent files

Declarative UI versions and loaders

14 of 14 releases match

Looking for an older file? The official Modrinth project page is in Resources.