mirror of
https://github.com/KAMKEEL/CustomNPC-Plus.git
synced 2026-11-12 20:07:32 +00:00
Fixed hover info being wrapped to the wrong font width
This commit is contained in:
1 parent
3b2ac768c6
commit
643b5e0d70
1 file changed
+1
-9
+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();
|
||||
|
||||
Reference in new issue
Block a user