Chat encryption happening too early for client side mods #385
Labels
3rd party issue
The issue is not related to this mod alone
bug
Something isn't working
confirmed
Confirmed bug/approved suggestion
Modloader
Fabric
Minecraft Version
1.19.4
Modloader Version
No Chat Reports Version
1.19.4-v2.1.1
Modpack Info
No response
The latest.log File
N/A
Bug Description
NCR encrypts messages too early in the process for most client-side mods to handle properly.
This is fixable by injecting into the chat message s2c/c2s packets initializers and doing the encryption there instead
Steps to Reproduce
Other Information
cabaletta/baritone#3894
looks like meteor also injects at the same spot https://github.com/MeteorDevelopment/meteor-client/blob/03d17cd4a6d5f8102cdbe2c5f2ed9cebc8b80b10/src/main/java/meteordevelopment/meteorclient/mixin/ClientPlayNetworkHandlerMixin.java#L130
also some mods such as jsmacros will end up bypassing the encryption by sending at that lower level;
https://github.com/JsMacros/JsMacros/blob/274c80c0d817276733a3d05ef20a477ec228f2af/common/src/main/java/xyz/wagyourtail/jsmacros/client/api/library/impl/FChat.java#L154
I'm sure there are many other mods like this
I suggest moving the encryption/decryption to happen when the packet classes are constructed in order to be compatible with most if not all client mods
The text was updated successfully, but these errors were encountered: