From d64cac8d58c2007ec31260b39b0f3a459e430bcb Mon Sep 17 00:00:00 2001 From: NopoTheGamer <40329022+NopoTheGamer@users.noreply.github.com> Date: Sun, 14 Jul 2024 02:17:02 +1000 Subject: Fix custom todos offsetting the todo overlay (#1235) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: Linnea Gräf --- .../io/github/moulberry/notenoughupdates/overlays/TextOverlay.java | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/main/java/io/github/moulberry/notenoughupdates/overlays/TextOverlay.java b/src/main/java/io/github/moulberry/notenoughupdates/overlays/TextOverlay.java index c4768b3e..5dc53dac 100644 --- a/src/main/java/io/github/moulberry/notenoughupdates/overlays/TextOverlay.java +++ b/src/main/java/io/github/moulberry/notenoughupdates/overlays/TextOverlay.java @@ -100,6 +100,10 @@ public abstract class TextOverlay { overlayHeight += 3; continue; } + if (s.startsWith("CUSTOM")) { + s = s.substring(s.indexOf(':') + 1); + } + for (String s2 : s.split("\n")) { int sWidth = Minecraft.getMinecraft().fontRendererObj.getStringWidth(s2); if (sWidth > overlayWidth) { -- cgit