Posted September 7, 201510 yr Alright. I know that I am missing something totally dumb. I want to know something custom above the food icons of the player. I know that I need to scale my rendering. But I am to dumb to get the math right now. The y pos is always correct, the x pos gets messed up by changing the size of minecraft. Any help is appreciated. Greetz Failender @SubscribeEvent public void renderGui(RenderGameOverlayEvent event) { if(event.type==ElementType.ALL) { GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F); GL11.glDisable(GL11.GL_LIGHTING); ExtendedPlayer ext = ExtendedPlayer.get(Minecraft.getMinecraft().thePlayer); Minecraft.getMinecraft().getTextureManager().bindTexture(schild); int xPos = event.resolution.getScaledWidth()-205; int yPos = event.resolution.getScaledHeight()-48; float percentage = (float)ext.getCurrentShield()/ext.getMaxShield(); drawTexturedModalRect(xPos, yPos, 0, 0, 16, 16); } }
September 7, 201510 yr Maybe try finding the middle (x/2) then going from there Creator of the MyFit, MagiCraft, Tesseract gun, and Papa's Wingeria mod.
September 7, 201510 yr Author already done that still dont changes the fact that i will need to add sth to the x value and scale that. and the event.resolution.getScaleFactor() is to inaccurate, since its an integer.
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.