When removing ChatLines from the drawChatLines of GuiNewWhat, if you have your chat opened and scrolled up somewhere, your whole chat will move.
This part of the code needs to be changed :
|
chatLinesWrapped.remove(index); |
Current :
chatLinesWrapped.remove(index);
index--;
Fixed :
chatLinesWrapped.remove(index);
index--;
if (mc.ingameGUI.getChatGUI().getChatOpen()) {
mc.ingameGUI.getChatGUI().scroll(-1);
}
In the method GuiNewChat.setLine, you can see that the vanilla code is doing the opposite operation to avoid the same problem when adding chat lines.
if (this.getChatOpen() && this.scrollPos > 0)
{
this.isScrolled = true;
this.scroll(1);
}
When removing ChatLines from the drawChatLines of GuiNewWhat, if you have your chat opened and scrolled up somewhere, your whole chat will move.
This part of the code needs to be changed :
Patcher/src/main/java/club/sk1er/patcher/util/chat/ChatHandler.java
Line 231 in 4ce6e19
Current :
Fixed :
In the method GuiNewChat.setLine, you can see that the vanilla code is doing the opposite operation to avoid the same problem when adding chat lines.