net.minecraft.client.gui.DrawableHelper Java Examples
The following examples show how to use
net.minecraft.client.gui.DrawableHelper.
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: ListWidget.java From Wurst7 with GNU General Public License v3.0 | 6 votes |
protected void renderHoleBackground(int top, int bottom, int topAlpha, int bottomAlpha) { Tessellator tessellator = Tessellator.getInstance(); BufferBuilder bufferBuilder = tessellator.getBuffer(); client.getTextureManager() .bindTexture(DrawableHelper.BACKGROUND_TEXTURE); RenderSystem.color4f(1.0F, 1.0F, 1.0F, 1.0F); bufferBuilder.begin(7, VertexFormats.POSITION_TEXTURE_COLOR); bufferBuilder.vertex(left, bottom, 0.0D).texture(0.0F, bottom / 32.0F) .color(64, 64, 64, bottomAlpha).next(); bufferBuilder.vertex(left + width, bottom, 0.0D) .texture(width / 32.0F, bottom / 32.0F) .color(64, 64, 64, bottomAlpha).next(); bufferBuilder.vertex(left + width, top, 0.0D) .texture(width / 32.0F, top / 32.0F).color(64, 64, 64, topAlpha) .next(); bufferBuilder.vertex(left, top, 0.0D).texture(0.0F, top / 32.0F) .color(64, 64, 64, topAlpha).next(); tessellator.draw(); }
Example #4
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(); } }
Example #5
Source File: SandboxTitleScreen.java From Sandbox with GNU Lesser General Public License v3.0 | 4 votes |
public void render(int int_1) { DrawableHelper.fill(this.startX - 2, this.startY - 2, this.endX + 2, this.endY - 1, 1428160512); SandboxTitleScreen.this.drawCenteredString(SandboxTitleScreen.this.font, this.line1.asFormattedString(), this.startX + ((endX - startX) / 2), this.startY, 16777215 | int_1); SandboxTitleScreen.this.drawString(SandboxTitleScreen.this.font, this.line2.asFormattedString(), (SandboxTitleScreen.this.width - this.line2Width) / 2, this.startY + 12, 16777215 | int_1); }
Example #6
Source File: RenderUtilImpl.java From Sandbox with GNU Lesser General Public License v3.0 | 4 votes |
@Override public void draw(int x, int y, float u, float v, int width, int height, int texWidth, int texHeight) { DrawableHelper.blit(x, y, u, v, width, height, texWidth, texHeight); }
Example #7
Source File: IForgeEffect.java From patchwork-api with GNU Lesser General Public License v2.1 | 1 votes |
/** * Called to draw the {@link StatusEffectInstance} onto the player's {@link net.minecraft.client.gui.hud.InGameHud} when it's active. * This can be used to e.g. render {@link StatusEffect} icons from your own texture. * * @param effect the active {@link StatusEffectInstance} * @param gui the gui instance * @param x the x coordinate * @param y the y coordinate * @param z the z level * @param alpha the alpha value, blinks when the {@link StatusEffect} is about to run out */ @Environment(EnvType.CLIENT) default void renderHUDEffect(StatusEffectInstance effect, DrawableHelper gui, int x, int y, float z, float alpha) { }