Skip to content

fix: badge missing from nametags with argentum 1.0.3 (1.8.9) - #255

Open
swirmed wants to merge 6 commits into
Polyfrost:mainfrom
swirmed:patch-1
Open

swirmed wants to merge 6 commits into
Polyfrost:mainfrom
swirmed:patch-1

Conversation

@swirmed

@swirmed swirmed commented Nov 8, 2026

Copy link
Copy Markdown

what's wrong

since argentum 1.0.3-beta.1 the poly+ badge is gone from nametags on 1.8.9 (tab is fine since that uses blitTab)

  • argentum now draws non-cacheable text with its own glyphs too, so making cacheable() return false isn't enough anymore and \ue000 never reaches MixinEmojiTextRenderer. it only falls back to vanilla when TextBatcher.begin returns NaN
  • charWidth(CZ[B)F is now charWidth(IZ)F, so the width hook doesn't apply
  • nametags get captured into argentum's NameTagBatch (it records the GL matrices and draws the glyphs itself), so even vanilla text inside a nametag ends up in the wrong place

also broke legacy chat emojis since they go through the same path

what I changed

  • MixinTextBatcher: begin returns NaN for text with the badge/emoji so argentum lets vanilla draw it, added the charWidth(IZ)F hook, and moved the emoji check into one helper that skips legacyIndex for anything below the private use area (it runs for every string). kept the old hooks for argentum 1.0.0
  • MixinEntityRendererArgentum + MixinNameTagBatch: badged player nametags render unbatched (NameTagBatch.active() returns null while they render). wraps renderNameTag at priority 2000 so it's outside argentum's wrapper
  • ArgentumNameTags: small helper holding that state, only does anything if argentum is loaded

everything is 1.8.9 only and require = 0 like the existing argentum compat

testing

tested in game on oneclient 1.8.9 (polyplus 1.4.6, argentum 1.0.3-beta.1, sarcio 1.2.0-beta.1) using the same mixins in a separate test mod: badge shows on nametags again and is centred, legacy chat emojis render again, no noticeable fps hit
chat-emoji
nametag-badge

this only fixes the drawing side. with sarcio's mem.alloc.name_tag_text on, badgesNameTag can still return false because the nametag string doesn't match the display name anymore (fixed on sarcio's side in QuicksilverMC/Sarcio#51, or here by #254)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: No status

Development

Successfully merging this pull request may close these issues.

1 participant