Java Code Examples for net.minecraft.client.gui.DrawableHelper#drawTexture()
The following examples show how to use
net.minecraft.client.gui.DrawableHelper#drawTexture() .
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: TacoCmd.java From Wurst7 with GNU General Public License v3.0 | 6 votes |
@Override public void onRenderGUI(MatrixStack matrixStack, float partialTicks) { GL11.glEnable(GL11.GL_BLEND); GL11.glDisable(GL11.GL_CULL_FACE); GL11.glEnable(GL11.GL_TEXTURE_2D); GL11.glBlendFunc(GL11.GL_SRC_ALPHA, GL11.GL_ONE_MINUS_SRC_ALPHA); if(WURST.getHax().rainbowUiHack.isEnabled()) { float[] acColor = WURST.getGui().getAcColor(); GL11.glColor4f(acColor[0], acColor[1], acColor[2], 1); }else GL11.glColor4f(1, 1, 1, 1); MC.getTextureManager().bindTexture(tacos[ticks / 8]); Window sr = MC.getWindow(); int x = sr.getScaledWidth() / 2 - 32 + 76; int y = sr.getScaledHeight() - 32 - 19; int w = 64; int h = 32; DrawableHelper.drawTexture(matrixStack, x, y, 0, 0, w, h, w, h); GL11.glEnable(GL11.GL_CULL_FACE); GL11.glDisable(GL11.GL_BLEND); }
Example 2
Source File: WurstLogo.java From Wurst7 with GNU General Public License v3.0 | 6 votes |
public void render(MatrixStack matrixStack) { if(!WurstClient.INSTANCE.getOtfs().wurstLogoOtf.isVisible()) return; String version = getVersionString(); TextRenderer tr = WurstClient.MC.textRenderer; // draw version background GL11.glEnable(GL11.GL_BLEND); GL11.glBlendFunc(GL11.GL_SRC_ALPHA, GL11.GL_ONE_MINUS_SRC_ALPHA); if(WurstClient.INSTANCE.getHax().rainbowUiHack.isEnabled()) { float[] acColor = WurstClient.INSTANCE.getGui().getAcColor(); GL11.glColor4f(acColor[0], acColor[1], acColor[2], 0.5F); }else GL11.glColor4f(1, 1, 1, 0.5F); drawQuads(0, 6, tr.getWidth(version) + 76, 17); // draw version string GL11.glEnable(GL11.GL_TEXTURE_2D); GL11.glEnable(GL11.GL_CULL_FACE); GL11.glDisable(GL11.GL_DEPTH_TEST); tr.draw(matrixStack, version, 74, 8, 0xFF000000); // draw Wurst logo GL11.glColor4f(1, 1, 1, 1); GL11.glEnable(GL11.GL_BLEND); WurstClient.MC.getTextureManager().bindTexture(texture); DrawableHelper.drawTexture(matrixStack, 0, 3, 0, 0, 72, 18, 72, 18); }
Example 3
Source File: AltRenderer.java From Wurst7 with GNU General Public License v3.0 | 6 votes |
public static void drawAltFace(MatrixStack matrixStack, String name, int x, int y, int w, int h, boolean selected) { try { bindSkinTexture(name); GL11.glEnable(GL11.GL_BLEND); if(selected) GL11.glColor4f(1, 1, 1, 1); else GL11.glColor4f(0.9F, 0.9F, 0.9F, 1); // Face int fw = 192; int fh = 192; float u = 24; float v = 24; DrawableHelper.drawTexture(matrixStack, x, y, u, v, w, h, fw, fh); // Hat fw = 192; fh = 192; u = 120; v = 24; DrawableHelper.drawTexture(matrixStack, x, y, u, v, w, h, fw, fh); GL11.glDisable(GL11.GL_BLEND); }catch(Exception e) { e.printStackTrace(); } }