Skip to content

Chat Formatting Fix#1520

Merged
codeHusky merged 7 commits intoMCLCE:mainfrom
DrPerkyLegit:chat-format
Apr 17, 2026
Merged

Chat Formatting Fix#1520
codeHusky merged 7 commits intoMCLCE:mainfrom
DrPerkyLegit:chat-format

Conversation

@DrPerkyLegit
Copy link
Copy Markdown
Contributor

Description

fixes a bug with the chat formatting

Changes

Previous Behavior

color didnt apply after the first message

Root Cause

if the string is too long it wraps around and breaks styling, doesnt respect visible message length

New Behavior

color works correctly
image

Fix Implementation

added functions to get the visible message length instead of raw message length
enforced html labels in UIScene_HUD::handleReload()
moved translateables from the chat handle function to the chat message format function
added the missing "§r" but with no styling we just use it as another "§f" option and make the color white

AI Use Disclosure

no

Related Issues

@Gatoel-capo
Copy link
Copy Markdown

yooo, cool, now i can make all things flashy

@codeHusky codeHusky self-assigned this Apr 17, 2026
@codeHusky codeHusky merged commit 1a552fb into MCLCE:main Apr 17, 2026
1 check passed
itsRevela pushed a commit to itsRevela/LCE-Revelations that referenced this pull request Apr 17, 2026
- Remove shadowcolor from font tags (Iggy doesn't support multiple)
- Enforce HTML text mode on chat labels and jukebox
- Move IDS translatable pattern matching into FormatChatMessage
- Add §r (reset) color code support
- Fix message truncation to count visible characters, skipping HTML tags
- Fix CJK truncation using raw index instead of visible char count
veroxsity pushed a commit to veroxsity/MinecraftConsoles that referenced this pull request Apr 18, 2026
* fix formatting in chat

iggy doesnt like multiple shadow colors

* enforce html labels

* dont format before sending packet, client formats anyway

* move translateables to chat format, restore original empty message results

* fix crappy string cutoff

* forgot a line on last commit, reset color support

* restore function to strip styling from player messages
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.

[Bug] when you color 2 words in 1 message the message breaks

3 participants