diff options
Diffstat (limited to 'me/Danker/handlers/TextRenderer.java')
-rw-r--r-- | me/Danker/handlers/TextRenderer.java | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/me/Danker/handlers/TextRenderer.java b/me/Danker/handlers/TextRenderer.java new file mode 100644 index 0000000..262f932 --- /dev/null +++ b/me/Danker/handlers/TextRenderer.java @@ -0,0 +1,13 @@ +package me.Danker.handlers; + +import net.minecraft.client.Minecraft; +import net.minecraft.client.gui.Gui; + +public class TextRenderer extends Gui { + public TextRenderer(Minecraft mc, String text, int x, int y, int colour) { + y -= mc.fontRendererObj.FONT_HEIGHT; + for (String line : text.split("\n")) { + drawString(mc.fontRendererObj, line, x, y += mc.fontRendererObj.FONT_HEIGHT, colour); + } + } +} |