Skip to content

Commit 643b5e0

Browse files
committed
Fixed hover info being wrapped to the wrong font width
1 parent 3b2ac76 commit 643b5e0

File tree

1 file changed

+1
-9
lines changed

1 file changed

+1
-9
lines changed

src/main/java/noppes/npcs/client/gui/util/script/interpreter/hover/TokenHoverRenderer.java

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -280,15 +280,7 @@ private static List<String> wrapText(String text, int maxWidth) {
280280
if (text == null || text.isEmpty()) {
281281
return lines;
282282
}
283-
284-
// Use Minecraft's built-in wrapping if available
285-
Minecraft mc = Minecraft.getMinecraft();
286-
if (mc.fontRenderer != null) {
287-
@SuppressWarnings("unchecked")
288-
List<String> wrapped = mc.fontRenderer.listFormattedStringToWidth(text, maxWidth);
289-
return wrapped;
290-
}
291-
283+
292284
// Fallback: simple word wrapping
293285
String[] words = text.split(" ");
294286
StringBuilder currentLine = new StringBuilder();

0 commit comments

Comments
 (0)