From 913fd81474e913bdd633bb43740b805449d90fd0 Mon Sep 17 00:00:00 2001 From: Vladislav Laetansky Date: Sat, 20 Aug 2022 20:19:01 +0300 Subject: [PATCH] Actually save GL state --- .../betterbarrels/client/render/TileEntityBarrelRenderer.java | 2 +- .../betterbarrels/client/render/TileEntityBaseRenderer.java | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/main/java/mcp/mobius/betterbarrels/client/render/TileEntityBarrelRenderer.java b/src/main/java/mcp/mobius/betterbarrels/client/render/TileEntityBarrelRenderer.java index d962a0e..d2faac5 100644 --- a/src/main/java/mcp/mobius/betterbarrels/client/render/TileEntityBarrelRenderer.java +++ b/src/main/java/mcp/mobius/betterbarrels/client/render/TileEntityBarrelRenderer.java @@ -39,7 +39,7 @@ public void renderTileEntityAt(TileEntity tileEntity, double xpos, double ypos, // the following is how it was set, enabling lighting makes it look better with smooth lighting, mostly... bottom labels are abit dark // will need to actually properly calculate lighting, but for now this looks better on smooth lit barrels than the full bright it was before // found another bug: disabling lighting causes grass to look white, and a few other quirks, putting this on hold for the momment - GL11.glPushAttrib(GL11.GL_BLEND | GL11.GL_LIGHTING); + GL11.glPushAttrib(GL11.GL_ENABLE_BIT); GL11.glDisable(GL11.GL_BLEND); GL11.glEnable(GL11.GL_LIGHTING); diff --git a/src/main/java/mcp/mobius/betterbarrels/client/render/TileEntityBaseRenderer.java b/src/main/java/mcp/mobius/betterbarrels/client/render/TileEntityBaseRenderer.java index 7d513c2..4f1f6f9 100644 --- a/src/main/java/mcp/mobius/betterbarrels/client/render/TileEntityBaseRenderer.java +++ b/src/main/java/mcp/mobius/betterbarrels/client/render/TileEntityBaseRenderer.java @@ -91,7 +91,7 @@ protected void renderTextOnBlock(String renderString, ForgeDirection side, Forge protected void renderStackOnBlock(ItemStack stack, ForgeDirection side, ForgeDirection orientation, Coordinates barrelPos, float size, double posx, double posy){ if (stack == null) { return; } - GL11.glPushAttrib(GL11.GL_ALPHA_TEST | GL11.GL_LIGHTING); + GL11.glPushAttrib(GL11.GL_ENABLE_BIT); GL11.glPushMatrix(); this.alignRendering(side, orientation, barrelPos); @@ -108,7 +108,7 @@ protected void renderStackOnBlock(ItemStack stack, ForgeDirection side, ForgeDir protected void renderIconOnBlock(IIcon icon, int sheet, ForgeDirection side, ForgeDirection orientation, Coordinates barrelPos, float size, double posx, double posy, double zdepth){ if (icon == null) { return ; } - GL11.glPushAttrib(GL11.GL_ALPHA_TEST | GL11.GL_LIGHTING); + GL11.glPushAttrib(GL11.GL_ENABLE_BIT); GL11.glPushMatrix(); this.alignRendering(side, orientation, barrelPos);