From 27d741f9d8db8f74edcd556b43053f25b40f7592 Mon Sep 17 00:00:00 2001 From: "BT (calcastor/mame)" <43831917+calcastor@users.noreply.github.com> Date: Thu, 15 Jun 2023 03:18:29 -0700 Subject: [PATCH] change: minor aesthetic updates for tab and chat features This hides the ping number in tab when it is the 9999 placeholder, and changes the repeat message counter to be [x2] rather than (2). --- .../mixins/features/GuiPlayerTabOverlayMixin_ReadablePing.java | 2 +- src/main/java/club/sk1er/patcher/util/chat/ChatHandler.java | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/main/java/club/sk1er/patcher/mixins/features/GuiPlayerTabOverlayMixin_ReadablePing.java b/src/main/java/club/sk1er/patcher/mixins/features/GuiPlayerTabOverlayMixin_ReadablePing.java index b0897991c..471e753ca 100644 --- a/src/main/java/club/sk1er/patcher/mixins/features/GuiPlayerTabOverlayMixin_ReadablePing.java +++ b/src/main/java/club/sk1er/patcher/mixins/features/GuiPlayerTabOverlayMixin_ReadablePing.java @@ -46,7 +46,7 @@ public class GuiPlayerTabOverlayMixin_ReadablePing { GlStateManager.pushMatrix(); GlStateManager.scale(0.5f, 0.5f, 0.5f); - mc.fontRendererObj.drawStringWithShadow(" " + (ping == 0 ? "?" : ping), (2 * x) - 10, 2 * y, color); + mc.fontRendererObj.drawStringWithShadow(" " + (ping == 0 ? "?" : ping == 9999 ? " " : ping), (2 * x) - 10, 2 * y, color); GlStateManager.scale(2.0f, 2.0f, 2.0f); GlStateManager.popMatrix(); ci.cancel(); diff --git a/src/main/java/club/sk1er/patcher/util/chat/ChatHandler.java b/src/main/java/club/sk1er/patcher/util/chat/ChatHandler.java index 4137b6f69..90fa9e21b 100644 --- a/src/main/java/club/sk1er/patcher/util/chat/ChatHandler.java +++ b/src/main/java/club/sk1er/patcher/util/chat/ChatHandler.java @@ -168,7 +168,7 @@ public static void appendMessageCounter(IChatComponent chatComponent, boolean re } else { entry.messageCount++; entry.lastSeenMessageMillis = currentTime; - chatComponent.appendSibling(new ChatComponentIgnored(ChatColor.GRAY + " (" + decimalFormat.format(entry.messageCount) + ")")); + chatComponent.appendSibling(new ChatComponentIgnored(ChatColor.GRAY + " [" + "x" + decimalFormat.format(entry.messageCount) + "]")); } } }