This site works best with JavaScript enabled. Please enable JavaScript to get the best experience from this site.
package net.minecraft.src; import net.minecraft.client.Minecraft; import org.lwjgl.opengl.GL11; public class mod_XPLevel extends BaseMod { public mod_XPLevel() { ModLoader.SetInGameHook(this, true, false); } public boolean OnTickInGame(Minecraft minecraft) { if(minecraft == null) { minecraft = ModLoader.getMinecraftInstance(); } if(minecraft != null){ overlay(minecraft, "/XP/XpBack.png"); } return true; } public void overlay(Minecraft minecraft, String s) { if(minecraft == null) { minecraft = ModLoader.getMinecraftInstance(); } ScaledResolution scaledresolution = new ScaledResolution(minecraft.gameSettings, minecraft.displayWidth, minecraft.displayHeight); int k = scaledresolution.getScaledWidth(); int l = scaledresolution.getScaledHeight(); GL11.glPushMatrix(); GL11.glBindTexture(3553, minecraft.renderEngine.getTexture(s)); GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F); minecraft.ingameGUI.drawTexturedModalRect(k / 3, l / 220, 96, 202, 160, 32); minecraft.ingameGUI.drawCenteredString(minecraft.fontRenderer, "Current XP: " + minecraft.thePlayer.field_35209_aZ, k / 2, l / 20, 16777215); GL11.glPopMatrix(); } public String Version() { return "1.8.1"; } }
I can render images but not text.
I currently have this and rendering the texture works but not the text.
Can someone help me?