Mods
Resource Packs
Data Packs
Modpacks
Shaders
Plugins
Mods Resource Packs Data Packs Plugins Shaders Modpacks
Get Modrinth App Upgrade to Modrinth+
Sign in
ModsPluginsData PacksShadersResource PacksModpacks
Sign in
Settings
DearImGui

DearImGui

A library mod providing a means of using ImGui within Minecraft

487
1
Decoration
Library
Utility
DearImGui has been archived. DearImGui will not receive any further updates unless the author decides to unarchive the project.

Compatibility

Minecraft: Java Edition

1.21
1.20.6
1.20.4
1.20.1–1.20.2
1.19.4
1.19.2
1.18.2
1.17.1
1.16.5

Platforms

Fabric

Supported environments

Client-side

90% of ad revenue goes to creators

Support creators and Modrinth ad-free with Modrinth+

Links

Report issues View source Join Discord server
Donate on Ko-fiSponsor on GitHubDonate on PayPal

Creators

deftu
deftu Member

Details

Licensed LGPL-3.0-or-later
Published 11 months ago
Updated 11 months ago
DescriptionChangelogVersions

DearImGui for Minecraft

A basic library mod giving developers the ability to use ImGui within Minecraft.


Discord Badge Ko-Fi Badge


Usage

Setup

You need to add it as a dependency in your build.gradle(.kts) file.

repositories {
    maven("https://maven.deftu.dev/snapshots")
}

dependencies {
    modImplementation("dev.deftu:dearimguimc-<MINECRAFTVERSION>-fabric:<VERSION>")
}

Of course, replace <MINECRAFTVERSION> with the version of Minecraft you are developing for, and <VERSION> with the version of the library you want to use.

Rendering

To render for ImGui, you need to create your own DearImGuiEntrypoint and add it to your fabric.mod.json file,

{
    "entrypoints": {
        "imgui": ["your.package.here.DearImGuiEntrypoint"]
    }
}

DearImGuiEntrypoint has two methods you can override - createRenderer and render.

public class ExampleDearImGuiEntrypoint implements DearImGuiEntrypoint {
    
    @Override
    public ImGuiRenderer createRenderer() {
        return new ExampleImGuiRenderer();
    }

    @Override
    public void render() {
        // Render ImGui here
    }
    
}

Both ultimately achieve the same goal, but createRenderer is more flexible and allows you to pass in additional parameters to your renderer.

Example Rendering

public class ExampleImGuiRenderer implements ImGuiRenderer {

    @Override
    public void render() {
        ImGui.showDemoWindow();
    }

}
public class ExampleDearImGuiEntrypoint implements DearImGuiEntrypoint {

    @Override
    public void render() {
        ImGui.showDemoWindow();
    }
    
}

BisectHosting


This project is licensed under LGPL-3.0
© 2024 Deftu

Modrinth is open source.

main@81b0922

© Rinth, Inc.

Company

TermsPrivacyRulesCareers

Resources

SupportBlogDocsStatus

Interact

Discord X (Twitter) Mastodon Crowdin
Get Modrinth App Settings
NOT AN OFFICIAL MINECRAFT SERVICE. NOT APPROVED BY OR ASSOCIATED WITH MOJANG OR MICROSOFT.