Fix button rendering

This commit is contained in:
Sebastian Hartte
2020-06-07 12:30:00 +02:00
parent 46b1d1ffdc
commit 53fc345e88
3 changed files with 7 additions and 8 deletions
@@ -23,7 +23,6 @@ import appeng.api.config.*;
import appeng.core.localization.ButtonToolTips;
import com.mojang.blaze3d.systems.RenderSystem;
import net.minecraft.client.Minecraft;
import net.minecraft.client.gui.widget.Widget;
import net.minecraft.client.gui.widget.button.Button;
import net.minecraft.client.renderer.texture.TextureManager;
import net.minecraft.util.ResourceLocation;
@@ -189,6 +188,7 @@ public class GuiImgButton extends Button implements ITooltip
TextureManager textureManager = minecraft.getTextureManager();
textureManager.bindTexture(TEXTURE_STATES);
RenderSystem.disableDepthTest();
RenderSystem.enableBlend(); // FIXME: This should be the _default_ state, but some vanilla widget disables it :|
if( this.halfSize )
{
this.width = 8;
@@ -91,10 +91,9 @@ public class GuiTabButton extends Button implements ITooltip
{
this.itemRenderer.zLevel = 100.0F;
RenderSystem.enableDepthTest();
// FIXME RenderHelper.enableGUIStandardItemLighting();
RenderHelper.enableStandardItemLighting();
this.itemRenderer.renderItemAndEffectIntoGUI( this.myItem, offsetX + this.x + 3, this.y + 3 );
RenderSystem.disableDepthTest();
RenderHelper.disableStandardItemLighting();
this.itemRenderer.zLevel = 0.0F;
}