diff options
author | Wyvest <45589059+Wyvest@users.noreply.github.com> | 2022-03-12 14:53:23 +0700 |
---|---|---|
committer | Wyvest <45589059+Wyvest@users.noreply.github.com> | 2022-03-12 14:53:23 +0700 |
commit | dd0d2d6d5c0191861cab0611d9fc28d7f4edb088 (patch) | |
tree | 96d8b3e88821e42b9b0357ddda1c5170992a57e5 /src/main/java/cc/woverflow/chatting/mixin/GuiNewChatMixin.java | |
parent | eef8bab78435d86107d95951cc1da04317520d33 (diff) | |
download | Chatting-dd0d2d6d5c0191861cab0611d9fc28d7f4edb088.tar.gz Chatting-dd0d2d6d5c0191861cab0611d9fc28d7f4edb088.tar.bz2 Chatting-dd0d2d6d5c0191861cab0611d9fc28d7f4edb088.zip |
chat tabs documentation
Diffstat (limited to 'src/main/java/cc/woverflow/chatting/mixin/GuiNewChatMixin.java')
-rw-r--r-- | src/main/java/cc/woverflow/chatting/mixin/GuiNewChatMixin.java | 11 |
1 files changed, 3 insertions, 8 deletions
diff --git a/src/main/java/cc/woverflow/chatting/mixin/GuiNewChatMixin.java b/src/main/java/cc/woverflow/chatting/mixin/GuiNewChatMixin.java index 9c292c6..d6a0b15 100644 --- a/src/main/java/cc/woverflow/chatting/mixin/GuiNewChatMixin.java +++ b/src/main/java/cc/woverflow/chatting/mixin/GuiNewChatMixin.java @@ -106,8 +106,11 @@ public abstract class GuiNewChatMixin extends Gui implements GuiNewChatHook { if (mouseX >= (left + ModCompatHooks.getXOffset()) && mouseY < bottom && mouseX < (right + 11 + ModCompatHooks.getXOffset()) && mouseY >= top) { chatting$shouldCopy = true; drawCopyChatBox(right, top); + args.set(4, ChattingConfig.INSTANCE.getHoveredChatBackgroundColor().getRGB()); + return; } } + args.set(4, ChattingConfig.INSTANCE.getChatBackgroundColor().getRGB()); } @Redirect(method = "drawChat", at = @At(value = "FIELD", target = "Lnet/minecraft/client/gui/GuiNewChat;drawnChatLines:Ljava/util/List;", opcode = Opcodes.GETFIELD)) @@ -125,14 +128,6 @@ public abstract class GuiNewChatMixin extends Gui implements GuiNewChatHook { return ModCompatHooks.redirectDrawString(text, x, y, color); } - @ModifyArg(method = "drawChat", at = @At(value = "INVOKE", target = "Lnet/minecraft/client/gui/GuiNewChat;drawRect(IIIII)V", ordinal = 0), index = 4) - private int changeChatBackgroundColor(int color) { - return (((color >> 24) & 0xFF) << 24) | - ((ChattingConfig.INSTANCE.getChatBackgroundColor().getRed() & 0xFF) << 16) | - ((ChattingConfig.INSTANCE.getChatBackgroundColor().getGreen() & 0xFF) << 8) | - ((ChattingConfig.INSTANCE.getChatBackgroundColor().getBlue() & 0xFF)); - } - @Redirect(method = "drawChat", at = @At(value = "INVOKE", target = "Lnet/minecraft/client/gui/GuiNewChat;drawRect(IIIII)V", ordinal = 1)) private void redirectScrollBar(int left, int top, int right, int bottom, int color) { if (!ChattingConfig.INSTANCE.getRemoveScrollBar()) { |