Skip to content

Installation

ssbaxys edited this page Oct 26, 2026 · 1 revision

How to add Lumina UI to your mod on Forge 1.20.1 or NeoForge 1.21.1.

Supported versions

Loader Minecraft Java Loader package
Forge 47.x 1.20.1 17 io.github.ssbaxys.lumina.forge
NeoForge 21.1.x 1.21.1 21 io.github.ssbaxys.lumina.neoforge

Almost the whole API (io.github.ssbaxys.lumina.*: widgets, layout, styles, animations, markup, HUD) is identical on both versions: it lives in a pure-Java core that does not touch Minecraft classes. You can keep your UI code in a shared module and build it for both versions unchanged. Only a few classes depend on the loader: the LuminaScreen screen and the container screens LuminaMenuType / LuminaMenuScreen.

The library is installed on both client and server. The server only needs it for container screens (LuminaMenu); everything else runs on the client, and client classes are never loaded on a dedicated server.

Adding Lumina to your mod

Gradle

Get the library jar from the Modrinth Maven repository. Replace <version> with the version number shown on the file's Modrinth page (each loader has its own file).

repositories {
    exclusiveContent {
        forRepository { maven { url = "https://api.modrinth.com/maven" } }
        filter { includeGroup "maven.modrinth" }
    }
}

dependencies {
    // NeoForge 1.21.1 (ModDevGradle)
    implementation "maven.modrinth:lumina-ui:<version>"

    // Forge 1.20.1 (ModDevGradle legacyforge)
    modImplementation "maven.modrinth:lumina-ui:<version>"

    // Forge 1.20.1 (ForgeGradle)
    implementation fg.deobf("maven.modrinth:lumina-ui:<version>")
}

You can also skip the repository: put the jar into libs/ and add files("libs/luminaui-....jar") with the same configuration.

If your shared UI code lives in a separate module without Minecraft, compileOnly on the same jar is enough: the core classes inside are identical for both loaders.

Mod metadata dependency

Forge 1.20.1, META-INF/mods.toml:

[[dependencies.mymod]]
modId = "luminaui"
mandatory = true
versionRange = "[0.1.0,)"
ordering = "AFTER"
side = "BOTH"

NeoForge 1.21.1, META-INF/neoforge.mods.toml:

[[dependencies.mymod]]
modId = "luminaui"
type = "required"
versionRange = "[0.1.0,)"
ordering = "AFTER"
side = "BOTH"

If your mod only uses Lumina on the client, side = "CLIENT" is fine.

Initialization

There is nothing to call. The luminaui mod calls Lumina.init(...) itself when the client starts, and registers its shaders, the HUD and translation reloading. Lumina.isInitialized() tells you whether it is ready.


English home · Your First Screen →

Clone this wiki locally