Make liquid rendering more resilient. Render water if the liquid icons are missing.

This commit is contained in:
Bernhard Bonigl committed 2014-08-21 20:01:24 +02:00
1 parent b75bb80340
commit b03b1ac5c8
1 file changed
+5
@@ -8,6 +8,7 @@ import net.minecraft.client.renderer.Tessellator;
import net.minecraft.init.Blocks;
import net.minecraft.util.IIcon;
import net.minecraft.world.IBlockAccess;
import net.minecraftforge.fluids.FluidRegistry;
public class BlockSkinRenderHelper
{
@@ -868,6 +869,10 @@ public class BlockSkinRenderHelper
var8 = var11;
}
// safety
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);
}