This commit is contained in:
Bruno Rybársky 2024-04-04 23:11:19 +02:00
parent 553e5a035f
commit 226e882e99
3 changed files with 2 additions and 17 deletions

@ -19,7 +19,8 @@ public class ChatDecryptorClient implements ClientModInitializer {
if(message_content.startsWith("BRNCrypt:")){ if(message_content.startsWith("BRNCrypt:")){
String strippedMessage = message_content.replace("BRNCrypt:", ""); String strippedMessage = message_content.replace("BRNCrypt:", "");
String decodedMessage = new String(Base64.getDecoder().decode(strippedMessage)); String decodedMessage = new String(Base64.getDecoder().decode(strippedMessage));
String outputMessage = "Decoded:" + decodedMessage; assert sender != null;
String outputMessage = "Decoded from " + sender.getName() + ":" + decodedMessage;
MinecraftClient.getInstance().inGameHud.getChatHud().addMessage(Text.of(outputMessage)); MinecraftClient.getInstance().inGameHud.getChatHud().addMessage(Text.of(outputMessage));
return false; return false;
} }

@ -1,13 +0,0 @@
{
"required": true,
"minVersion": "0.8",
"package": "systems.brn.chatencryptor",
"compatibilityLevel": "JAVA_17",
"mixins": [
],
"client": [
],
"injectors": {
"defaultRequire": 1
}
}

@ -20,9 +20,6 @@
"systems.brn.chatencryptor.ChatDecryptorClient" "systems.brn.chatencryptor.ChatDecryptorClient"
] ]
}, },
"mixins": [
"chatencryptor.mixins.json"
],
"depends": { "depends": {
"fabricloader": ">=${loader_version}", "fabricloader": ">=${loader_version}",
"fabric": "*", "fabric": "*",