Skip to content

fix(render): draw other players' name tags without the show-name flags - #66

Merged
notchyves merged 1 commit into
theselauraproject:mainfrom
NaySurGithub:fix/player-nametags
Nov 6, 2026
Merged

notchyves merged 1 commit into
theselauraproject:mainfrom
NaySurGithub:fix/player-nametags

Conversation

@NaySurGithub

Copy link
Copy Markdown
Contributor

Problem

On The Hive, Perlin draws no name tag above other players, only your own.

Cause

EntityRenderer only allowed a player's name tag when its actor flags had CAN_SHOW_NAME (bit 14) or ALWAYS_SHOW_NAME (bit 15):

const bool nameAllowed =
    e.isSelf || e.Has(flag::CanShowName) || e.Has(flag::AlwaysShowName) || !e.isPlayer;

That rule came in with a merge (58e5986) and was never checked against the vanilla client.

Evidence

The evidence is a packet capture (Perlin packetlog) of a Hive hub with PERLIN_DEBUG_NAMETAGS=1: 38 add_player and 91 player add_player / set_entity_data records with metadata. None of them sets bit 14 or 15, but every one carries a name tag:

Flags received Bits set Bit 14 Bit 15 Example name tag
1970359197237248 (most players) 19, 35, 48, 49, 50 0 0 §7Robino1000, §7Sumpkin619\n§9 3669 Total Kills
1970359197237256 (sneaking players) 3, 19, 35, 48, 49, 50 0 0 §7gamer nolan 203\n§eThe §bSky Warrior
1970496636190720 (our own player) 19, 35, 37, 48, 49, 50 0 0 §7NaykuuMc\n§cThe Defender
1688884220002304 (shop NPCs added as players) 35, 49, 50 0 0 §a§lSteampunk Wings§r\n§e490…\n§r§7Tap to view

The vanilla client shows all of these names on that server, so it does not require the show-name flags for players. Perlin drew only one player name tag in the whole capture: our own, which bypassed the rule through isSelf.

Change

EntityRenderer.cpp: the nameAllowed gate is removed. Everything else stays as it was:

  • invisible players still hide their name;
  • items still have no tag;
  • the first-person / own-name-tag option still applies;
  • the 64-block range for players still applies.

Testing

  • The client build is running; it has not been tested in game yet.
  • Still to do: rejoin the Hive hub and check that every player's name tag and the shop NPCs' labels show, as on the vanilla client.

Players only got a name tag when their flags carried CAN_SHOW_NAME (bit 14)
or ALWAYS_SHOW_NAME (bit 15). Servers often send neither while still
setting a name tag, and the game draws it anyway, so every other player's
name was missing there.
@notchyves
notchyves merged commit b70ab5c into theselauraproject:main Nov 6, 2026
10 checks passed
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.

2 participants