Skip to content

Contributing

Build Galdur UI, run it with the test mod, and send a pull request. Here is how the repository is organised and the rules it follows.

⏱ 5 minGaldur UI 0.1.0

Build and run

Terminal
.\gradlew.bat runClient   # starts the development client (library + test mod).\gradlew.bat build       # compiles, runs the tests and builds the jar in build/libs.\gradlew.bat test        # unit tests only (without starting Minecraft)

You need Java 21. On Linux and macOS, use ./gradlew instead of .\gradlew.bat.

The test mod

Demo screens, test blocks and debug tools live in a separate source set, src/testmod, as a second mod (galduruitest). Development runs load it next to Galdur UI; it is never in the library jar.

CommandWhat it does
/galdurui testDemo screen of every widget.
/galdurui windowDemo of the declarative GaldurWindow API.
/galdurui debugToggles the layout debug outlines.
/galdurui fpsToggles an FPS counter that stays visible on screens (F3 is hidden there).
/galduruidev chestGives a test chest (also in the "Functional Blocks" creative tab) that opens in a GaldurContainerScreen.
/galduruidev terminalOpens a test terminal: a grid of every item in the game above the inventory.

The test mod also adds a blue theme resource pack (Options → Resource Packs), which overrides only part of theme.json.

Structure

  • com.galdurstudio.galdurui.api: public, stable API used by our mods. api.menu is the only package that can load on a dedicated server; all others are client-only.
  • com.galdurstudio.galdurui.internal: internal implementation, may change at any time. internal.render.GaldurRender is the only class that calls GuiGraphics.
  • No public api signature exposes an internal type.

Rules

  • Never make api.* depend on internal.* types in a public signature.
  • Keep development tools in the test mod, never in the library jar.
  • Public API methods may stay unused inside the repository (GaldurButton.withSprites, GaldurLabel.getText, GaldurPanelLayout.withSprite…): they are part of the API offered to mods.
  • Write Javadoc for every public class and method: this site's API reference is generated from it.
  • Update the Changelog under [Unreleased].

Sprites

If you change a sprite's shape, regenerate them with .\gradlew.bat generateSprites and commit the PNGs: CI fails if they no longer match the generator. See Sprites.

Questions

Open an issue on GitHub, or ask on the Discord: we answer every question.

© 2026 Galdur Studio · galdurstudio.com · Discord · LGPL-3.0-onlyNot an official Minecraft product. Not approved by or associated with Mojang or Microsoft.