Skip to content

Commit

Permalink
Make liquid rendering more resilient. Render water if the liquid icon…
Browse files Browse the repository at this point in the history
…s are missing.
  • Loading branch information
bonii-xx committed Aug 21, 2014
1 parent b75bb80 commit b03b1ac
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/main/java/tconstruct/client/BlockSkinRenderHelper.java
Expand Up @@ -8,6 +8,7 @@
import net.minecraft.init.Blocks;
import net.minecraft.util.IIcon;
import net.minecraft.world.IBlockAccess;
import net.minecraftforge.fluids.FluidRegistry;

public class BlockSkinRenderHelper
{
Expand Down Expand Up @@ -868,6 +869,10 @@ public static boolean renderLiquidBlock (IIcon stillIcon, IIcon flowingIcon, int
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);
}
Expand Down

0 comments on commit b03b1ac

Please sign in to comment.