CraftUI 1.2.0 для Minecraft 26.3 (Fabric)
Файлы · 2
8dba882b25a2f8c52e856c681d0dc838661742a1SHA-512a8c5d531edbe9615fdf993b71ded3853b8f1f0c2f2fe80ea89a0593dd504a4054b9f6fd671b2eb262f81de87f715803624e5a55415f466a415ce241268ba19ecЧто изменилось
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.