TabListMixin @Overwrite drops server tab names, rank prefixes and team colours #3

Closed
opened 2026-09-25 11:43:39 +00:00 by selimaj-dev · 0 comments
Owner

Problem

TabListMixin in every versions/* folder @Overwrites PlayerListEntry.getDisplayName():

if (SaturnPlayer.get(uuid) != null) {
    return Text.literal(Roles.getSaturnIndicator())...append(Text.literal(name)...);
}
return Text.literal(name);

Vanilla returns the display name the server set, which is null when none is set. PlayerListHud then falls back to Team.decorateName(...). The overwrite:

  • throws away server-set tab names (rank prefixes, coloured names, formatting) for every player
  • never returns null, so team colours, prefixes and suffixes are never applied

This affects every player in the tab list, Saturn users or not. On most large servers the tab list looks wrong for anyone running the client.

@Overwrite also conflicts with any other mod that touches this method.

Fix

  • Replace the @Overwrite with an injection that decorates the original result: @Inject at RETURN with cir.setReturnValue(...), or @ModifyReturnValue via MixinExtras.
  • If the original is null, return null for non-Saturn players so the team decoration still happens. For Saturn players, build the icon plus Team.decorateName(team, Text.literal(name)).
  • Apply the change to all eight versions/* folders.
## Problem `TabListMixin` in every `versions/*` folder `@Overwrite`s `PlayerListEntry.getDisplayName()`: ```java if (SaturnPlayer.get(uuid) != null) { return Text.literal(Roles.getSaturnIndicator())...append(Text.literal(name)...); } return Text.literal(name); ``` Vanilla returns the display name the server set, which is `null` when none is set. `PlayerListHud` then falls back to `Team.decorateName(...)`. The overwrite: - **throws away server-set tab names** (rank prefixes, coloured names, formatting) for every player - **never returns `null`**, so team colours, prefixes and suffixes are never applied This affects every player in the tab list, Saturn users or not. On most large servers the tab list looks wrong for anyone running the client. `@Overwrite` also conflicts with any other mod that touches this method. ## Fix - Replace the `@Overwrite` with an injection that decorates the original result: `@Inject` at `RETURN` with `cir.setReturnValue(...)`, or `@ModifyReturnValue` via MixinExtras. - If the original is `null`, return `null` for non-Saturn players so the team decoration still happens. For Saturn players, build the icon plus `Team.decorateName(team, Text.literal(name))`. - Apply the change to all eight `versions/*` folders.
Sign in to join this conversation.