Fixed hover info being wrapped to the wrong font width

This commit is contained in:
bigguy345 committed 2025-12-27 22:49:40 +02:00
1 parent 3b2ac768c6
commit 643b5e0d70
1 file changed
+1 -9
@@ -280,15 +280,7 @@ public class TokenHoverRenderer {
if (text == null || text.isEmpty()) {
return lines;
}
// Use Minecraft's built-in wrapping if available
Minecraft mc = Minecraft.getMinecraft();
if (mc.fontRenderer != null) {
@SuppressWarnings("unchecked")
List<String> wrapped = mc.fontRenderer.listFormattedStringToWidth(text, maxWidth);
return wrapped;
}
// Fallback: simple word wrapping
String[] words = text.split(" ");
StringBuilder currentLine = new StringBuilder();