Repository navigation
Always show mob nametags without crosshair + cache LevelHead tag scan - #48
Draft
dsnsgithub wants to merge 1 commit into
Draft
dsnsgithub wants to merge 1 commit into
dsnsgithub wants to merge 1 commit into
Conversation
- Add alwaysShowEntityNametags option (default on): fake the crosshair check in MobRenderer.shouldRenderNameTag so named mobs render their nametag without being targeted, matching newer versions. Unnamed mobs stay tag-free; players are unaffected. - Cache the LevelHead tagsAbove entity scan per entity per tick in an Int2ObjectOpenHashMap to avoid iterating all loaded entities every frame.
dsnsgithub
force-pushed
the
mob-nametags-without-crosshair
branch
from
November 13, 2026 06:13
bac793b to
b86c6e7
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
hasCustomName()check is untouched so unnamed mobs stay tag-free, and players are unaffected (PlayerRendererdoesn't route throughMobRenderer).tagsAbovescan per entity per tick (Int2ObjectOpenHashMap<double[]>keyed by network id). The scan iterates every loaded entity in a box, previously once per nametag per frame — the big FPS cost with LevelHead enabled on Hypixel. Cache entries are invalidated whenentity.ticksorbaseAbovechanges and the map is cleared past 1024 entries.Implementation notes
MobRendererMixinuses@ModifyExpressionValueon theEntityRenderDispatcher.targetEntityGETFIELD insideMobRenderer.shouldRenderNameTag, returning theMobEntityitself when the option is enabled so themob == targetEntitycomparison passes.default-profile.jsonand the pack override) both set the new option to"true".