From 79c2d03ccdfab977e7490ebbe1b6acd9d0d53a5b Mon Sep 17 00:00:00 2001 From: RacoonDog <32882447+RacoonDog@users.noreply.github.com> Date: Thu, 10 Aug 2023 19:55:59 -0400 Subject: [PATCH] the J --- .../meteorclient/mixin/ChatHudMixin.java | 4 ++-- .../meteorclient/systems/modules/misc/BetterChat.java | 8 ++++---- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/src/main/java/meteordevelopment/meteorclient/mixin/ChatHudMixin.java b/src/main/java/meteordevelopment/meteorclient/mixin/ChatHudMixin.java index f8268e978a..3d221a4c0b 100644 --- a/src/main/java/meteordevelopment/meteorclient/mixin/ChatHudMixin.java +++ b/src/main/java/meteordevelopment/meteorclient/mixin/ChatHudMixin.java @@ -89,7 +89,7 @@ private void onAddMessage(Text message, @Nullable MessageSignatureData signature for (int i = messages.size() - 1; i > -1 ; i--) { if (((IChatHudLine) (Object) messages.get(i)).getId() == nextId && nextId != 0) { messages.remove(i); - Modules.get().get(BetterChat.class).lines.remove(i); + Modules.get().get(BetterChat.class).lines.removeInt(i); } } @@ -235,7 +235,7 @@ private void onRemoveMessage(Text message, MessageSignatureData signature, int t int size = betterChat.lines.size() - (betterChat.isLongerChat() && betterChat.getChatLength() >= 100 ? betterChat.getChatLength() : 0); while (size > 100) { - betterChat.lines.remove(size - 1); + betterChat.lines.removeInt(size - 1); size--; } } diff --git a/src/main/java/meteordevelopment/meteorclient/systems/modules/misc/BetterChat.java b/src/main/java/meteordevelopment/meteorclient/systems/modules/misc/BetterChat.java index 16ad357c1f..7cf9815e3c 100644 --- a/src/main/java/meteordevelopment/meteorclient/systems/modules/misc/BetterChat.java +++ b/src/main/java/meteordevelopment/meteorclient/systems/modules/misc/BetterChat.java @@ -270,7 +270,7 @@ private Text appendAntiSpam(Text text) { if (messages.isEmpty()) return null; for (int i = 0; i < Math.min(antiSpamDepth.get(), messages.size()); i++) { - String stringToCheck = messages.get(i).content().copy().getString(); + String stringToCheck = messages.get(i).content().getString(); Matcher timestampMatcher = timestampRegex.matcher(stringToCheck); if (timestampMatcher.find()) { @@ -304,17 +304,17 @@ private Text appendAntiSpam(Text text) { int start = -1; for (int i = 0; i < messageIndex; i++) { - start += lines.get(i); + start += lines.getInt(i); } - int i = lines.get(messageIndex); + int i = lines.getInt(messageIndex); while (i > 0) { visible.remove(start + 1); i--; } messages.remove(messageIndex); - lines.remove(messageIndex); + lines.removeInt(messageIndex); } return returnText;