diff options
author | Wyvest <45589059+Wyvest@users.noreply.github.com> | 2022-01-09 00:15:10 +0700 |
---|---|---|
committer | Wyvest <45589059+Wyvest@users.noreply.github.com> | 2022-01-09 00:15:10 +0700 |
commit | ddc94dc9388086657b889d8fd43a82bcadd82bbe (patch) | |
tree | a407b76c62122298e43ff51b10a78114637d5bba /src/main/java/cc/woverflow/chatting/mixin/GuiChatMixin.java | |
parent | 7612c2e65d07e9b3ce13729da4eb95a6d7173a71 (diff) | |
download | Chatting-ddc94dc9388086657b889d8fd43a82bcadd82bbe.tar.gz Chatting-ddc94dc9388086657b889d8fd43a82bcadd82bbe.tar.bz2 Chatting-ddc94dc9388086657b889d8fd43a82bcadd82bbe.zip |
fix chat copy being in the wrong position
Diffstat (limited to 'src/main/java/cc/woverflow/chatting/mixin/GuiChatMixin.java')
-rw-r--r-- | src/main/java/cc/woverflow/chatting/mixin/GuiChatMixin.java | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/main/java/cc/woverflow/chatting/mixin/GuiChatMixin.java b/src/main/java/cc/woverflow/chatting/mixin/GuiChatMixin.java index 73b76e7..b39950b 100644 --- a/src/main/java/cc/woverflow/chatting/mixin/GuiChatMixin.java +++ b/src/main/java/cc/woverflow/chatting/mixin/GuiChatMixin.java @@ -83,7 +83,7 @@ public abstract class GuiChatMixin extends GuiScreen { GuiNewChatHook hook = ((GuiNewChatHook) Minecraft.getMinecraft().ingameGUI.getChatGUI()); float f = mc.ingameGUI.getChatGUI().getChatScale(); int x = MathHelper.floor_float((float) mouseX / f); - if (hook.shouldCopy() && (hook.getRight() + ModCompatHooks.getXOffset()) <= x && (hook.getRight() + ModCompatHooks.getXOffset()) + 11 > x) { + if (hook.shouldCopy() && (hook.getRight() + ModCompatHooks.getXOffset() + 3) <= x && (hook.getRight() + ModCompatHooks.getXOffset()) + 13 > x) { GuiUtils.drawHoveringText(COPY_TOOLTIP, mouseX, mouseY, width, height, -1, fontRendererObj); GlStateManager.disableLighting(); } @@ -94,7 +94,7 @@ public abstract class GuiChatMixin extends GuiScreen { GuiNewChatHook hook = ((GuiNewChatHook) Minecraft.getMinecraft().ingameGUI.getChatGUI()); float f = mc.ingameGUI.getChatGUI().getChatScale(); int x = MathHelper.floor_float((float) mouseX / f); - if (hook.shouldCopy() && (hook.getRight() + ModCompatHooks.getXOffset()) <= x && (hook.getRight() + ModCompatHooks.getXOffset()) + 11 > x) { + if (hook.shouldCopy() && (hook.getRight() + ModCompatHooks.getXOffset() + 3) <= x && (hook.getRight() + ModCompatHooks.getXOffset()) + 13 > x) { Transferable message = hook.getChattingChatComponent(Mouse.getY()); if (message == null) return; try { |