diff options
| author | NopoTheGamer <40329022+NopoTheGamer@users.noreply.github.com> | 2024-07-14 02:17:02 +1000 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2024-07-13 18:17:02 +0200 |
| commit | d64cac8d58c2007ec31260b39b0f3a459e430bcb (patch) | |
| tree | 20b825a808655ce1d2c5cc9d7374d86325eb54b9 | |
| parent | a915330605eba5c4608624e6598676d86bc006ce (diff) | |
| download | notenoughupdates-d64cac8d58c2007ec31260b39b0f3a459e430bcb.tar.gz notenoughupdates-d64cac8d58c2007ec31260b39b0f3a459e430bcb.tar.bz2 notenoughupdates-d64cac8d58c2007ec31260b39b0f3a459e430bcb.zip | |
Fix custom todos offsetting the todo overlay (#1235)
Co-authored-by: Linnea Gräf <nea@nea.moe>
| -rw-r--r-- | src/main/java/io/github/moulberry/notenoughupdates/overlays/TextOverlay.java | 4 |
1 files changed, 4 insertions, 0 deletions
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) { |
