Fix liquids in tanks not rendering their top side if an opaque block is on top. (Relevant for all non-full tanks)

This commit is contained in:
Bernhard Bonigl committed 2014-08-24 20:37:52 +02:00
1 parent 1daf7fa248
commit 9070c73466
3 files changed
+12 -5

No files matched your search

@@ -884,8 +884,17 @@ public class BlockSkinRenderHelper
if(stillIcon == null) stillIcon = FluidRegistry.WATER.getStillIcon();
if(flowingIcon == null) flowingIcon = FluidRegistry.WATER.getFlowingIcon();
return Minecraft.isAmbientOcclusionEnabled() ? renderFakeBlockWithAmbientOcclusion(stillIcon, flowingIcon, x, y, z, var6, var7, var8, renderer, world) : renderFakeBlockWithColorMultiplier(
stillIcon, flowingIcon, x, y, z, var6, var7, var8, renderer, world);
boolean raf = renderer.renderAllFaces;
renderer.renderAllFaces = true;
boolean ret;
if(Minecraft.isAmbientOcclusionEnabled())
ret = renderFakeBlockWithAmbientOcclusion(stillIcon, flowingIcon, x, y, z, var6, var7, var8, renderer, world);
else
ret = renderFakeBlockWithColorMultiplier(stillIcon, flowingIcon, x, y, z, var6, var7, var8, renderer, world);
renderer.renderAllFaces = raf;
return ret;
}
static boolean renderFakeBlockWithAmbientOcclusion (IIcon stillIcon, IIcon flowingIcon, int xPos, int yPos, int zPos, float colorRed, float colorGreen, float colorBlue, RenderBlocks render,