From 4796623f7796c88bc6387a6132c7da1a6d426a46 Mon Sep 17 00:00:00 2001 From: RacoonDog <32882447+RacoonDog@users.noreply.github.com> Date: Tue, 28 Nov 2023 22:25:07 -0500 Subject: [PATCH] prevent leading spaces --- .../meteorclient/systems/modules/misc/BookBot.java | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/main/java/meteordevelopment/meteorclient/systems/modules/misc/BookBot.java b/src/main/java/meteordevelopment/meteorclient/systems/modules/misc/BookBot.java index 01c0cc4eb9..e3f6980b8b 100644 --- a/src/main/java/meteordevelopment/meteorclient/systems/modules/misc/BookBot.java +++ b/src/main/java/meteordevelopment/meteorclient/systems/modules/misc/BookBot.java @@ -275,6 +275,8 @@ private void writeBook(PrimitiveIterator.OfInt chars) { lineIndex++; // Wrap to next line, unless wrapping to next page if (lineIndex != 14) page.appendCodePoint(c); + } else if (lineWidth == 0f && c == ' ') { + continue; // Prevent leading space from text wrapping } else { lineWidth += charWidth; page.appendCodePoint(c);