Hiding and resizing HUD elements with a resource pack
The hotbar, crosshair and XP bar all live in one texture atlas. Here is how to make parts of it invisible, what cannot be moved, and the font trick for custom HUD text.
There is no config for hiding the hotbar. What there is, is a texture — and making part of it transparent removes it visually while everything keeps working.
Everything is in one file
assets/minecraft/textures/gui/sprites/hud/
Modern versions split the old widgets.png atlas into individual sprites: hotbar.png, crosshair.png, experience_bar_background.png, heart/full.png, and so on. Replacing any one with a fully transparent PNG of the same dimensions hides it.
Same dimensions matters. A 1×1 transparent PNG where a 182×22 hotbar was expected stretches rather than disappearing, producing a smeared band.
What you can and cannot do
Can:
- hide any element by making its sprite transparent
- restyle everything — different hearts, a minimal crosshair, a themed hotbar
- change apparent size by drawing smaller content inside a same-size canvas
Cannot:
- move an element. Positions are hardcoded; only the artwork is data.
- hide the hotbar slots independently of the frame — they are one sprite.
- change what a slot does. This is cosmetic only, and the item is still selectable.
That last point is worth stating plainly: a hidden hotbar is still a hotbar. This is not an inventory restriction, and a player can still use the slots.
The nine-slice trap
Several HUD sprites are nine-sliced — corners fixed, edges stretched. A .mcmeta beside the PNG declares the borders:
{ "gui": { "scaling": { "type": "nine_slice", "width": 200, "height": 20,
"border": { "left": 2, "top": 2, "right": 2, "bottom": 2 } } } }
Replace such a sprite without matching the mcmeta and it stretches wrongly. Copy the vanilla .mcmeta alongside your PNG when in doubt.
Custom HUD text via fonts
The genuinely powerful trick: define a font provider whose glyphs are images, then print those characters with /title or a bossbar. The text renders as your artwork.
assets/<namespace>/font/default.json
{ "providers": [
{ "type": "bitmap", "file": "my_pack:font/icons.png", "ascent": 8, "height": 9,
"chars": [""] }
] }
Use private-use codepoints ( upward) so nothing collides with real text. Then /title @a actionbar {"text":""} draws your image on the action bar.
This is how servers show custom health bars, currency icons and progress meters with no mod on the client — only a resource pack.
Negative-space fonts
Define a glyph with negative advances and you can move the cursor backwards, layering images on top of each other. That is the technique behind server HUDs that look like proper interfaces. It is fiddly, and it is the only way to position anything.
Hide or restyle HUD elements and build font providers with the codepoints allocated for you in the HUD Customizer & Font Pack Maker.