Links
Tags
Creators
Details
1.2.0
Compatibility
Changes
This is the first major API/content update since 1.0. It is backwards compatible with previous versions, but it adds new features, so you'll need to update the minimum version in your mod properties.
Additions
Industry-standard Viewport Controls
A new ViewportControlHelper class adds support for industry-standard, 3D-editor-style orbit, pan, and zoom navigation. Its default control scheme is:
Alt + M1: OrbitAlt + M3: PanM3: Zoom
These can be changed by overriding the helper class. Scroll-to-zoom is also supported.
Editor Gizmos
ImGuizmo is now supported natively. While this was possible before by initializing it manually, CraftUI now manages the projection matrix automatically.
To use it, call GizmoHelper.setupGizmos() while drawing your viewport window, then use ImGuizmo as usual. Wrapper methods are provided that use JOML matrices instead of raw float arrays for convenience.
Note that, due to the risk of floating-point precision errors at large world coordinates, gizmos are always drawn relative to the camera.
Camera State Cache
CraftUI caches various elements of the world render state, such as camera position and projection matrices, each frame. These values are used internally by gizmos and viewport raycasting, and can be accessed via:
CraftUI.getCameraPos()CraftUI.getCameraRot()CraftUI.getViewRotationMatrix()CraftUI.getRawProjectionMatrix()CraftUI.getProjectionMatrix()(y-inverted for ImGuizmo and other standard math)CraftUI.getTickDelta()
CraftUI Render Events
Various event-based callbacks (CraftUIRenderEvents) have been added to hook into the CraftUI render pipeline. These are powerful and could interfere with other mods, so use them with caution:
PRE_RENDERCOMPUTE_VIEWPORT_BOUNDS(can override the computed bounds)UPDATE_STYLEPOST_COMPOSITEBEGIN_FRAMEandEND_FRAMEBEFORE_RENDERandAFTER_RENDERBEGIN_RENDERandEND_RENDER
Each event receives a context object that exposes the open apps, the viewport bounds, and whether it's a cleanup frame.
Fixes
- Text input is now properly started and stopped through Minecraft's
TextInputManager. - Mouse button releases are no longer swallowed when ImGui wants the mouse, so buttons aren't left "held". (Fix by MCJEModder2026)
- Selectables in the NBT editor now use
NoAutoClosePopups, so the NBT editor can now be used within app-provided popups. - LWJGL core is now excluded from transitive dependencies so CraftUI doesn't force a version on consumers. This was only a problem in dev.
- Removed the unused
font-awesome-brandsicon font frominter.json. - Stopped Gson from complaining to the console every time a style was loaded.
Supplementary resources
| File | Type | Size | |
|---|---|---|---|
| craftui-1.2.0-sources.jar | Sources jar | 598.28 KiB |
Projects on Modrinth are automatically available through a Maven repository for use with JVM build tools such as Gradle. To learn more about the Modrinth Maven API, click here.
Note: When available, you should use the creator's maven repo instead as it will have transitive dependency information that the Modrinth Maven API does not. You may also end up with duplicate dependencies if you use a mix of Modrinth and non-Modrinth Maven repositories for your dependencies, because the group identifier will be different when served through the Modrinth Maven API.
Maven coordinates:
Version ID:
build.gradle:
repositories {
exclusiveContent {
forRepository {
maven {
name = "Modrinth"
url = "https://api.modrinth.com/maven"
}
}
// forRepositories(fg.repository) // Uncomment when using ForgeGradle
filter {
includeGroup "maven.modrinth"
}
}
}
// Standard Gradle dependency
dependencies {
implementation "maven.modrinth:b4T2AF9Q:7AcK6H4L"
}
// Legacy Loom dependency
dependencies {
modImplementation "maven.modrinth:b4T2AF9Q:7AcK6H4L"
}

