Skip to content

Commit

Permalink
Use state-save blending for liquid block drawing. This should finally…
Browse files Browse the repository at this point in the history
… solve all the drawing weirdness with alpha for any liquids drawn by tinkers. #1356
  • Loading branch information
bonii-xx committed Jan 24, 2015
1 parent fb99258 commit 08af51f
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions src/main/java/tconstruct/client/BlockSkinRenderHelper.java
Expand Up @@ -891,18 +891,16 @@ public static boolean renderLiquidBlock (IIcon stillIcon, IIcon flowingIcon, int
boolean raf = renderer.renderAllFaces;
renderer.renderAllFaces = true;

//Tessellator.instance.setColorRGBA_F(alpha, red, green, blue);

GL11.glEnable(GL11.GL_BLEND);
GL11.glAlphaFunc(GL11.GL_GREATER, 0.1f);
// alpha blending etc.
GL11.glPushAttrib(GL11.GL_COLOR_BUFFER_BIT);

boolean ret;
if (Minecraft.isAmbientOcclusionEnabled())
ret = renderFakeBlockWithAmbientOcclusion(stillIcon, flowingIcon, x, y, z, red, green, blue, renderer, world);
else
ret = renderFakeBlockWithColorMultiplier(stillIcon, flowingIcon, x, y, z, red, green, blue, renderer, world);

//GL11.glDisable(GL11.GL_BLEND);
GL11.glPopAttrib();

renderer.renderAllFaces = raf;
return ret;
Expand Down

0 comments on commit 08af51f

Please sign in to comment.