aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/cc/woverflow/chatting/mixin/GuiNewChatMixin_Scrolling.java
diff options
context:
space:
mode:
authorWyvest <45589059+Wyvest@users.noreply.github.com>2023-01-17 09:44:34 -0500
committerWyvest <45589059+Wyvest@users.noreply.github.com>2023-01-17 09:44:34 -0500
commit5822703b7d770ec67a4c4ca00192006b8f0cb9b9 (patch)
tree7ded70762db28ec2321ce25bd20d3313a26c52df /src/main/java/cc/woverflow/chatting/mixin/GuiNewChatMixin_Scrolling.java
parent6120b123648f2ccf7a5d5efea1a5c3600a725196 (diff)
downloadChatting-5822703b7d770ec67a4c4ca00192006b8f0cb9b9.tar.gz
Chatting-5822703b7d770ec67a4c4ca00192006b8f0cb9b9.tar.bz2
Chatting-5822703b7d770ec67a4c4ca00192006b8f0cb9b9.zip
smooth messages / scrolling animation speed
fix sending messages (again lol)
Diffstat (limited to 'src/main/java/cc/woverflow/chatting/mixin/GuiNewChatMixin_Scrolling.java')
-rw-r--r--src/main/java/cc/woverflow/chatting/mixin/GuiNewChatMixin_Scrolling.java3
1 files changed, 1 insertions, 2 deletions
diff --git a/src/main/java/cc/woverflow/chatting/mixin/GuiNewChatMixin_Scrolling.java b/src/main/java/cc/woverflow/chatting/mixin/GuiNewChatMixin_Scrolling.java
index 8598a94..c87ec6f 100644
--- a/src/main/java/cc/woverflow/chatting/mixin/GuiNewChatMixin_Scrolling.java
+++ b/src/main/java/cc/woverflow/chatting/mixin/GuiNewChatMixin_Scrolling.java
@@ -43,7 +43,6 @@ public abstract class GuiNewChatMixin_Scrolling extends Gui {
scrollPos = (int) chatting$scrollingAnimation.get(Chatting.INSTANCE.getDeltaTicks());
}
}
- Chatting.INSTANCE.setDeltaTicks(0);
}
@Redirect(method = "drawChat", at = @At(value = "INVOKE", target = "Lnet/minecraft/client/gui/GuiNewChat;drawRect(IIIII)V", ordinal = 1))
@@ -66,7 +65,7 @@ public abstract class GuiNewChatMixin_Scrolling extends Gui {
ci.cancel();
ChatScrollingHook.INSTANCE.setShouldSmooth(false);
int result = (int) MathUtils.clamp(scrollPos + amount, 0, Math.max(drawnChatLines.size() - getLineCount() - 1, 0));
- chatting$scrollingAnimation = new EaseOutQuad(150, scrollPos, result, false);
+ chatting$scrollingAnimation = new EaseOutQuad((int) (ChattingConfig.INSTANCE.getScrollingSpeed() * 1000), scrollPos, result, false);
}
}
}