Move, scale and hide any HUD element, from vanilla or from other mods, with an in-game drag-and-drop editor.
Minecraft 1.21.1 · NeoForge · client-side only · CC0 (public domain)
Press K in game to open the editor. The player-facing feature list and full controls are in MODRINTH.md.
- Layers: NeoForge draws the HUD as named GUI layers and fires
RenderGuiLayerEvent.Pre/Postaround each one.LayerTransformerwraps every layer in a transform on RenderSystem's model-view matrix. That also moves mods that skipGuiGraphicsand draw with their own matrices, like Xaero's Minimap. - Overlays outside layers: mods that draw in
RenderGuiEvent.Pre/Postinstead of registering a layer are grouped into two pseudo-layers,relocateui:before_hudandrelocateui:after_hud. - Compat mixins (
mixin/compat, applied only when the target mod is installed, viaRelocateUIMixinPlugin): Jade's overlay is split out of the after-HUD group intojade:overlay(LayerTransformer.beginNested). Spell Atlas's inventory panels are moved by shifting the rectangles itsInventoryPanel.area()/bottomArea()return. - Menus:
ScreenEditorandScreenLayoutmove widgets that mods add to container screens (via an offset inAbstractWidget.getX()/getY()) and compat-reported panels, with offsets saved per screen type. - Bounds:
GuiGraphicsMixinhooks the low-level draw methods (fill,innerBlit,drawString,renderItem, and so on) to measure where each layer naturally draws. Anchoring and scaling are computed from that measurement. The same mixin moves scissor rectangles, which ignore matrices. - HUD under the editor:
GameRendererMixinhides the editor screen during the HUD pass, so mods that skip drawing while a screen is open keep drawing. - Storage: layouts are saved to
config/relocateui-layout.json.
| File | Role |
|---|---|
client/LayerTransformer |
Applies each layer's placement and keeps the matrix stack balanced |
client/LayerTracker |
Natural bounds per layer, and which layers drew this frame |
client/Placement, client/Anchor |
Anchor and scale math |
client/LayoutStore |
JSON persistence |
client/LayoutEditorScreen |
The editor: dragging, snapping, grid, keys |
./gradlew build # jar in build/libs/
./gradlew runClient # dev client; put test mods in run/client/mods/
Requires Java 21.
CC0 1.0. Files from the NeoForge MDK template are under TEMPLATE_LICENSE.txt.