aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/cc/woverflow/chatting/mixin/GuiChatMixin.java
diff options
context:
space:
mode:
authorWyvest <45589059+Wyvest@users.noreply.github.com>2023-01-15 20:48:43 -0500
committerWyvest <45589059+Wyvest@users.noreply.github.com>2023-01-15 20:48:43 -0500
commit6120b123648f2ccf7a5d5efea1a5c3600a725196 (patch)
treee639898972b6fcad22feb5ae160b48c16d88ac63 /src/main/java/cc/woverflow/chatting/mixin/GuiChatMixin.java
parentd911fe8ded771c54c327cfef2783c0cda1c71f2b (diff)
downloadChatting-6120b123648f2ccf7a5d5efea1a5c3600a725196.tar.gz
Chatting-6120b123648f2ccf7a5d5efea1a5c3600a725196.tar.bz2
Chatting-6120b123648f2ccf7a5d5efea1a5c3600a725196.zip
fixed some smooth scrolling bugs
Diffstat (limited to 'src/main/java/cc/woverflow/chatting/mixin/GuiChatMixin.java')
-rw-r--r--src/main/java/cc/woverflow/chatting/mixin/GuiChatMixin.java10
1 files changed, 6 insertions, 4 deletions
diff --git a/src/main/java/cc/woverflow/chatting/mixin/GuiChatMixin.java b/src/main/java/cc/woverflow/chatting/mixin/GuiChatMixin.java
index 5eced71..cc015ab 100644
--- a/src/main/java/cc/woverflow/chatting/mixin/GuiChatMixin.java
+++ b/src/main/java/cc/woverflow/chatting/mixin/GuiChatMixin.java
@@ -1,9 +1,6 @@
package cc.woverflow.chatting.mixin;
-import cc.woverflow.chatting.chat.ChatSearchingManager;
-import cc.woverflow.chatting.chat.ChatShortcuts;
-import cc.woverflow.chatting.chat.ChatTab;
-import cc.woverflow.chatting.chat.ChatTabs;
+import cc.woverflow.chatting.chat.*;
import cc.woverflow.chatting.config.ChattingConfig;
import cc.woverflow.chatting.gui.components.ClearButton;
import cc.woverflow.chatting.gui.components.ScreenshotButton;
@@ -131,4 +128,9 @@ public abstract class GuiChatMixin extends GuiScreen {
}
return original;
}
+
+ @Inject(method = "handleMouseInput", at = @At(value = "INVOKE", target = "Lnet/minecraft/client/gui/GuiNewChat;scroll(I)V"))
+ private void handleMouseInput(CallbackInfo ci) {
+ ChatScrollingHook.INSTANCE.setShouldSmooth(true);
+ }
}