Posted March 22, 20196 yr The textures cant be een for ome reason they appear to be affected by lighting how do i fix? GuiDragon: https://pastebin.com/az2eyAX7 Edited March 23, 20196 yr by TheRPGAdventurer
March 22, 20196 yr Author ok ok i fixed it: heres the solution /** * Draws this button to the screen. */ @Override public void drawButton(Minecraft mc, int mouseX, int mouseY, float partialTicks) { if (visible) { if (dragon.allowedOtherPlayers()) { mc.getTextureManager().bindTexture(lockOpen); } else if (!dragon.allowedOtherPlayers()) { mc.getTextureManager().bindTexture(lockLocked); } else if(!enabled) { mc.getTextureManager().bindTexture(lockDisabled); } GlStateManager.color(1.0F, 1.0F, 1.0F, 1.0F); this.hovered = mouseX >= this.x && mouseY >= this.y && mouseX < this.x + this.width && mouseY < this.y + this.height; GlStateManager.tryBlendFuncSeparate(GlStateManager.SourceFactor.SRC_ALPHA, GlStateManager.DestFactor.ONE_MINUS_SRC_ALPHA, GlStateManager.SourceFactor.ONE, GlStateManager.DestFactor.ZERO); GlStateManager.blendFunc(GlStateManager.SourceFactor.SRC_ALPHA, GlStateManager.DestFactor.ONE_MINUS_SRC_ALPHA); drawModalRectWithCustomSizedTexture(x, y, 0.0F, 0.0F, 16, 16, 16, 16); } } } Just call these 2 : GlStateManager.tryBlendFuncSeparate(GlStateManager.SourceFactor.SRC_ALPHA, GlStateManager.DestFactor.ONE_MINUS_SRC_ALPHA, GlStateManager.SourceFactor.ONE, GlStateManager.DestFactor.ZERO); GlStateManager.blendFunc(GlStateManager.SourceFactor.SRC_ALPHA, GlStateManager.DestFactor.ONE_MINUS_SRC_ALPHA); } }
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.