v1.0.0 JAVA MOD LIBRARY
Design System
Game pixel grid units, layered bevel anatomy, immediate-mode lifecycle, and keyboard focus rules.
Ore UI avoids rounded corners and soft drop shadows. Depth is built from stacked rectangles, directional 1-pixel bevels, and hard-edged extrusion shadows.
Game Pixel Grid
In the Figma Ore UI specification, 1 Ore UI design unit equals 4px on the Figma canvas and 1 GUI pixel in Minecraft Java Edition (with fractional values rounded down):
Constant (OreUi.*) |
Value (GUI px) | Component |
|---|---|---|
BUTTON_HEIGHT |
26 |
Standard ui.button(...) height (26.25 px rounded down) |
NAV_HEIGHT |
25 |
ui.navItem(...) and ui.navHeader(...) row height |
CHECK_SIZE |
14 |
ui.checkbox(...) square size (14.5 px rounded down) |
RADIO_SIZE |
22 |
ui.radio(...) bounding box for the 45° diamond |
FIELD_HEIGHT |
31 |
ui.textBox(...), ui.searchBox(...), and ui.banner(...) height |
TAB_HEIGHT |
27 |
ui.tabBar(...), ui.tabButton(...), ui.navButtonHorizontal(...), and ui.selectionButton(...) height |
BADGE_HEIGHT |
14 |
ui.badge(...) and ui.seamlessButton(...) height |
HANDLE |
14 |
ui.slider(...) handle width and height |
BAR_OVERLAP |
1 |
Horizontal pixel overlap used by tabRow, navRowHorizontal, and selectionRow |
SEAMLESS_FRAME |
12 |
Icon-only seamless square reference frame |
Bevel & Shadow Anatomy
Every raised control (ui.face(...)) follows the exact same layer order:
- Outer Outline (
OreTone.DARK/0xFF1E1E1F):1pxsolid frame wrapping the entire control. - Face & Bevels: Main surface fill with a
1pxlighterstrokeon the bottom and right, and a1pxtranslucentlighthighlight (0x33FFFFFFat rest) on the top and left. - Shadow Rows:
2pxsolid block (shadowRows = 2) below the face inside the#1E1E1Foutline. When pressed,sinkincreases (up to3px) andshadowRowscollapses to0so the control physically sinks. - Focus Ring (
OreTone.FOCUS/0xFFFFFFFF):1pxsolid#FFFFFFoutline drawn outside the#1E1E1Fborder viaui.focusRing(...). Focus rings are deferred toui.end()so they render cleanly above adjacent widgets while respecting active scissor clips.
Immediate-Mode Lifecycle & Primitives
OreUi is immediate-mode: components render and register their hit/focus regions in the same call, with later calls sitting on top of earlier ones:
ui.begin(graphics, font, mouseX, mouseY, screenWidth, screenHeight): Resets the frame’s hit list, focusables, and clip state, and computes frame delta time (clamped <= 0.05s) for springs and hover transitions.ui.end(): Renders deferred focus rings, renders opendropdown(...)modal popups on top, and updates the hardware cursor (POINTING_HANDover clickables,NOT_ALLOWEDover areas marked withmarkDisabledArea(...)).ui.block(): Swallows all earlier hit targets and clears earlier Tab stops so a modal popup never leaks clicks, hovers, or focus to content behind it.ui.pushClip(x0, y0, x1, y1)/ui.popClip(): Intersecting scissor stack used by scrollable panels and text fields so both drawing and hit-testing clip cleanly.- Primitive helpers:
ui.face(...),ui.faceRing(...),ui.surface(...),ui.focusRing(...),ui.approach(...),ui.spring(...),ui.springTo(...).