Skip to content

Add armor bar to HUD#134

Open
Purdze wants to merge 3 commits intomasterfrom
feat/armor-hud
Open

Add armor bar to HUD#134
Purdze wants to merge 3 commits intomasterfrom
feat/armor-hud

Conversation

@Purdze
Copy link
Copy Markdown
Collaborator

@Purdze Purdze commented Apr 5, 2026

Summary

  • Track the player's armor attribute via ClientboundUpdateAttributes (filtered to the local player's entity id)
  • Render a 10-icon armor row above the health bar, hidden when armor is 0
  • Collapse status bar rendering to one draw call per slot (applies to health, food, and armor)

Test plan

  • Connect to a server with no armor equipped, no armor row shown
  • Equip armor (/give @s diamond_chestplate etc.), iron-blue armor icons appear above health
  • Take a hit that damages armor, half-armor icon renders correctly
  • Remove all armor, row disappears

Purdze added 2 commits April 6, 2026 22:15
Handle ClientboundSetExperience packet and render the XP bar with
level number above the hotbar. Hidden in creative and spectator.
Track the player's armor attribute via ClientboundUpdateAttributes and
render a 10-icon armor row above the health bar. Also collapsed status
bar rendering to one draw per slot.
- Apply mul_base to (base + add) instead of just base
- Use 8-directional outline for XP level number including diagonals
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant