Skip to content

Serialize GAME_INFO chat content as legacy text for legacy clients - #1631

Open
kuraiwtf wants to merge 2 commits into
retrooper:2.0from
kuraiwtf:2.0
Open

kuraiwtf wants to merge 2 commits into
retrooper:2.0from
kuraiwtf:2.0

Conversation

@kuraiwtf

Copy link
Copy Markdown

Problem
On legacy clients (from 1.8 to 1.15), action bar messages (GAME_INFO) sent through the chat packet lose their component formatting. The text appears white even when the component sets a color, for example {"color":"green","text":"Test"}.

The client calls getUnformattedText on the component in GuiIngame.setOverlayMessage(IChatComponent, boolean), which drops the styling. The same content renders correctly when the formatting is written as legacy § codes.

Summary
ChatMessageProcessorLegacy.writeChatMessage now converts GAME_INFO content to plain text with LegacyComponentSerializer.legacySection() before writing it. The color and formatting are kept as § codes, which the legacy client renders. Other chat types are written unchanged.

This branch has not been deployed

No deployments
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