16 lines
583 B
Java
16 lines
583 B
Java
package io.gitlab.jfronny.googlechat.mixin;
|
|
|
|
import io.gitlab.jfronny.googlechat.*;
|
|
import io.gitlab.jfronny.libjf.LibJf;
|
|
import net.minecraft.client.gui.screen.*;
|
|
import org.spongepowered.asm.mixin.*;
|
|
import org.spongepowered.asm.mixin.injection.*;
|
|
|
|
@Mixin(ChatScreen.class)
|
|
public class ChatScreenMixin {
|
|
@ModifyVariable(method = "sendMessage(Ljava/lang/String;Z)Z", at = @At(value = "HEAD"), argsOnly = true, ordinal = 0)
|
|
String googlechat$translateChatText(String chatText) {
|
|
return GoogleChat.translateIfNeeded(chatText, GoogleChat.Direction.C2S, true);
|
|
}
|
|
}
|