tierrif / chat-utils

Minecraft Fabric client-side mod to ease chat message copying.
https://modrinth.com/mod/chatutils/
GNU Lesser General Public License v3.0
17 stars 6 forks source link

Copies chat colors even when settings are false #29

Open Fluboxer opened 11 months ago

Fluboxer commented 11 months ago

Describe the bug Title. It just ignores setting, giving you &b colors and &lstuff

To Reproduce

  1. Copy message involving chat colors
  2. thats it

Expected behavior Not this

Screenshots while screenshot for #28 is suitable as you can see wrong colors, I have more... noticeable example 2023-07-19_17 50 28

Client information

Additional context Obviously, just like previous issue, that one is new version only. Previous mod version is just fine

Fluboxer commented 11 months ago

It also once ate "&" symbol but rest was still here?

2023-07-19_19 10 36

tierrif commented 11 months ago

When it comes to the setting, it's inverted, temporarily "enable" color copying and it'll stop copying color codes. For the missing '&' symbols now and then, it's apparently because the § symbol isn't being fully replaced. I will look into this.

Fluboxer commented 11 months ago

Yes, it seems like copy colors is inverted. It also don't eat all color codes

Here is OFF and ON on the setting (on is second one, but some color codes remain) Message indeed looks like this: "[13:26:21] [Render thread/INFO]: [CHAT] You already ate this cake recently! §8[§cx3§8]"

изображение изображение

Fluboxer commented 10 months ago

It's still a thing 💀 fix fixed most of the cases (for example, I can properly copy all stuff above) - but there are some rare occurrences when it still happens in case of Hypixel Skyblock it happens when you attempt to copy auction bought message. Both copy colors options are off

изображение

retrixe commented 10 months ago

https://github.com/tierrif/chat-utils/issues/35#issuecomment-1677122672 this comment of yours is the same issue as what you are describing here

I'm aware of the cause and will look into fixing it in my spare time, or @tierrif will if he feels like it, I talked to him about the underlying cause just now as well. I will reopen this issue and ignore that comment for now (the other issue described in it is likely #28).

Chat logs for my own (or anyone else's) ref [04:33] when you switch from Minecraft Text to Adventure [04:33] Text supports having colour codes in {"content":"&f over here with section sign instead of & obv"} [04:34] Adventure doesn't because that's stupid [04:34] so when you cross over then it just becomes `
` [04:34] I wrote a workaround but ig it's imperfect [04:34] so we will need to bring back stripColor and translateAlternateColorCodes after running through PlainTextComponentSerialiser