aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/cc
diff options
context:
space:
mode:
authorXThe <101992755+SirXThe@users.noreply.github.com>2023-02-26 18:22:35 +0100
committerGitHub <noreply@github.com>2023-02-26 12:22:35 -0500
commit38af8a31a642fa3112ceb7651dd673e1de58851e (patch)
treedd4981f10d917b1409e4340f716f634d5ab805ab /src/main/java/cc
parentccd2380da028e74b08e5c794c0721c325fec261f (diff)
downloadChatting-38af8a31a642fa3112ceb7651dd673e1de58851e.tar.gz
Chatting-38af8a31a642fa3112ceb7651dd673e1de58851e.tar.bz2
Chatting-38af8a31a642fa3112ceb7651dd673e1de58851e.zip
fix: fix: resolve duplicated lines are missing in chat screenshots (#21)
Diffstat (limited to 'src/main/java/cc')
-rw-r--r--src/main/java/cc/woverflow/chatting/mixin/GuiNewChatMixin.java4
-rw-r--r--src/main/java/cc/woverflow/chatting/mixin/GuiNewChatMixin_SmoothMessages.java2
2 files changed, 3 insertions, 3 deletions
diff --git a/src/main/java/cc/woverflow/chatting/mixin/GuiNewChatMixin.java b/src/main/java/cc/woverflow/chatting/mixin/GuiNewChatMixin.java
index 6d4a60d..5503e35 100644
--- a/src/main/java/cc/woverflow/chatting/mixin/GuiNewChatMixin.java
+++ b/src/main/java/cc/woverflow/chatting/mixin/GuiNewChatMixin.java
@@ -28,7 +28,7 @@ import java.awt.datatransfer.Transferable;
import java.awt.image.BufferedImage;
import java.util.List;
-@Mixin(value = GuiNewChat.class, priority = Integer.MIN_VALUE)
+@Mixin(value = GuiNewChat.class, priority = 990)
public abstract class GuiNewChatMixin extends Gui implements GuiNewChatHook {
@Unique
private int chatting$right = 0;
@@ -243,7 +243,7 @@ public abstract class GuiNewChatMixin extends Gui implements GuiNewChatHook {
ChatLine fullLine = this.getFullMessage(subLine);
if (GuiScreen.isShiftKeyDown()) {
if (fullLine != null) {
- BufferedImage image = Chatting.INSTANCE.screenshotLine(fullLine);
+ BufferedImage image = Chatting.INSTANCE.screenshotLine(subLine);
if (image != null) RenderUtils.copyToClipboard(image);
}
return null;
diff --git a/src/main/java/cc/woverflow/chatting/mixin/GuiNewChatMixin_SmoothMessages.java b/src/main/java/cc/woverflow/chatting/mixin/GuiNewChatMixin_SmoothMessages.java
index 0ef7736..d2604de 100644
--- a/src/main/java/cc/woverflow/chatting/mixin/GuiNewChatMixin_SmoothMessages.java
+++ b/src/main/java/cc/woverflow/chatting/mixin/GuiNewChatMixin_SmoothMessages.java
@@ -69,7 +69,7 @@ public abstract class GuiNewChatMixin_SmoothMessages {
return line;
}
- @ModifyArg(method = "drawChat", at = @At(value = "INVOKE", target = "Lnet/minecraft/client/gui/FontRenderer;drawStringWithShadow(Ljava/lang/String;FFI)I"), index = 3)
+ @ModifyArg(method = "drawChat", at = @At(value = "INVOKE", target = "Lnet/minecraft/client/gui/FontRenderer;drawStringWithShadow(Ljava/lang/String;FFI)I"))
private int modifyTextOpacity(int original) {
if (ChattingConfig.INSTANCE.getSmoothChat() && chatting$lineBeingDrawn <= chatting$newLines) {
int opacity = (original >> 24) & 0xFF;