mirror of
https://github.com/KAMKEEL/CustomNPC-Plus.git
synced 2026-11-22 22:29:50 +00:00
Fix Tooltip
This commit is contained in:
1 parent
69eb728e59
commit
fd43cd6b67
2 files changed
+7
-4
No files matched your search
@@ -1,10 +1,13 @@
|
||||
package noppes.npcs.client.gui.util;
|
||||
|
||||
import kamkeel.npcs.util.TextSplitter;
|
||||
import net.minecraft.client.gui.GuiScreen;
|
||||
import net.minecraft.util.ResourceLocation;
|
||||
import net.minecraft.util.StatCollector;
|
||||
import org.lwjgl.opengl.GL11;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Arrays;
|
||||
import java.util.List;
|
||||
|
||||
public class GuiHoverText extends GuiScreen {
|
||||
@@ -28,8 +31,7 @@ public class GuiHoverText extends GuiScreen {
|
||||
this.drawTexturedModalRect(this.x, this.y, 0, 0, 12, 12);
|
||||
|
||||
if (inArea(x, y, 12, 12, par1, par2)) {
|
||||
List<String> lines = new ArrayList<String>();
|
||||
lines.add(text);
|
||||
List<String> lines = TextSplitter.splitText(StatCollector.translateToLocal(text), 30);
|
||||
this.drawHoveringText(lines, x + 8, y + 6, this.fontRendererObj);
|
||||
GL11.glDisable(GL11.GL_LIGHTING);
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user