Skip to content

Add XP bar and level display#133

Open
Purdze wants to merge 2 commits intomasterfrom
feat/xp-bar
Open

Add XP bar and level display#133
Purdze wants to merge 2 commits intomasterfrom
feat/xp-bar

Conversation

@Purdze
Copy link
Copy Markdown
Collaborator

@Purdze Purdze commented Apr 5, 2026

Summary

  • Handle ClientboundSetExperience packet; store level/progress/total on LocalPlayer
  • Render 182x5 XP bar above hotbar with scissor-clipped progress fill
  • Draw level number centered above the bar with 4-direction black outline and XP green (#80FF20)
  • Hidden in creative/spectator; hearts and hunger shifted up to make room

Test plan

  • Join a survival server, run /xp add @s 100, bar fills and level shows above hotbar
  • /xp set @s 0 points, bar empties, level hides at 0
  • /gamemode creative, XP bar and level disappear; survival restores them
  • Change GUI scale, bar scales with hotbar and stays pixel-aligned

Purdze added 2 commits April 5, 2026 11:07
Handle ClientboundSetExperience packet and render the XP bar with
level number above the hotbar. Hidden in creative and spectator.
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