stackotter / delta-client

An open source Minecraft Java Edition client built for speed.
https://deltaclient.app
GNU General Public License v3.0
322 stars 33 forks source link

Add ANSI styling to chat and disconnect messages when logged to terminal #110

Open stackotter opened 2 years ago

stackotter commented 2 years ago

It's pretty self explanatory, currently chat and disconnect messages are just printed out plain (and disconnect messages don't even have the legacy formatting codes removed).

ninjadev64 commented 1 year ago

Would we just need to modify ChatComponentColor to provide ANSI escape sequences for each enumeration, and then use tokens.map(\.color.rawValue + \.string).joined() in LegacyFormattedText#toString?

stackotter commented 1 year ago

Yeah essentially, although don’t make the rawValue ansi, just give the colour enum an ansiValue property (cause we might need more ‘raw’ values in future too)

ninjadev64 commented 1 year ago

Alright, I'll do this one.