Installation
Add Galdur UI to your mod's Gradle build, declare it in neoforge.mods.toml, and you are ready to open your first window.
You need a mod for Minecraft 1.21.1 and NeoForge 21.1, built with Java 21.
Publish Galdur UI locally
Until Galdur Studio has a Maven repository, Galdur UI is published to a repo/ folder next to its sources. In the galdur-ui folder, run:
.\gradlew.bat publish # writes repo/com/galdurstudio/galdurui/galdurui/<version>/Add the dependency
In your mod's build.gradle (the path is relative to your mod's folder):
repositories { maven { url = uri("../galdur-ui/repo") }}dependencies { implementation "com.galdurstudio.galdurui:galdurui:0.1.0"}Declare it in neoforge.mods.toml
In src/main/resources/META-INF/neoforge.mods.toml, replace mymod with your mod id:
[[dependencies.mymod]]modId = "galdurui"type = "required"versionRange = "[0.1,0.2)"ordering = "NONE"side = "BOTH"Before 1.0.0, a minor version may still break the API. Depending on [0.1,0.2) keeps your mod on compatible versions. See Versions & compatibility.
Ship it
Galdur UI is a separate mod: players install it next to yours. It is not bundled in your jar, so do not shade or jar-in-jar it.
Check that it works
Open a window from client code, for instance from a key mapping or a client command:
GaldurWindow window = GaldurLib.createWindow();window.addTitle(Component.literal("Hello"), true);window.addButton(Component.literal("Close"), window::close, true);window.open();If the window shows, you are set. Next: Your first window.