Change liquid rendering in tanks: Make liquids brighter, and don't draw the flowing texture

This commit is contained in:
Bernhard Bonigl committed 2014-08-24 20:17:08 +02:00
1 parent a270c30500
commit 1daf7fa248
2 files changed
+12 -4

No files matched your search

@@ -852,6 +852,11 @@ public class BlockSkinRenderHelper
}
public static boolean renderLiquidBlock (IIcon stillIcon, IIcon flowingIcon, int x, int y, int z, RenderBlocks renderer, IBlockAccess world)
{
return renderLiquidBlock(stillIcon, flowingIcon, x, y, z, renderer, world, false);
}
public static boolean renderLiquidBlock (IIcon stillIcon, IIcon flowingIcon, int x, int y, int z, RenderBlocks renderer, IBlockAccess world, boolean extraBright)
{
Block block = Blocks.stone;
int var5 = block.colorMultiplier(world, x, y, z);
@@ -869,6 +874,12 @@ public class BlockSkinRenderHelper
var8 = var11;
}
if(extraBright) {
var6 = Math.max(1.0f, var6 + 0.5f);
var7 = Math.max(1.0f, var7 + 0.5f);
var8 = Math.max(1.0f, var8 + 0.5f);
}
// safety
if(stillIcon == null) stillIcon = FluidRegistry.WATER.getStillIcon();
if(flowingIcon == null) flowingIcon = FluidRegistry.WATER.getFlowingIcon();
@@ -47,10 +47,7 @@ public class TankRender implements ISimpleBlockRenderingHandler
FluidStack liquid = logic.tank.getFluid();
renderer.setRenderBounds(0.001, 0.001, 0.001, 0.999, logic.getFluidAmountScaled(), 0.999);
Fluid fluid = liquid.getFluid();
if (fluid.canBePlacedInWorld())
BlockSkinRenderHelper.renderMetadataBlock(fluid.getBlock(), 0, x, y, z, renderer, world);
else
BlockSkinRenderHelper.renderLiquidBlock(fluid.getStillIcon(), fluid.getFlowingIcon(), x, y, z, renderer, world);
BlockSkinRenderHelper.renderLiquidBlock(fluid.getStillIcon(), fluid.getStillIcon(), x, y, z, renderer, world, true);
renderer.setRenderBounds(00, 0.001, 0.001, 0.999, logic.getFluidAmountScaled(), 0.999);
}