Make dynamic tanks render gaseous fluids by transparency instead of level.

This commit is contained in:
Ben Spiers 2013-08-22 23:55:06 +01:00
parent f39e3a528d
commit 486e5aa334

View file

@ -60,8 +60,17 @@ public class RenderDynamicTank extends TileEntitySpecialRenderer
MekanismRenderer.glowOn();
}
boolean gas = tileEntity.structure.fluidStored.getFluid().isGaseous();
int[] displayList = getListAndRender(data, tileEntity.structure.fluidStored.getFluid(), tileEntity.worldObj);
GL11.glCallList(displayList[(int)(((float)tileEntity.structure.fluidStored.amount/(float)tileEntity.clientCapacity)*((float)getStages(data.height)-1))]);
if(gas)
{
GL11.glColor4f(1.F, 1.F, 1.F, (float)tileEntity.structure.fluidStored.amount / (float)tileEntity.clientCapacity);
GL11.glCallList(displayList[getStages(data.height)-1]);
}
else {
GL11.glCallList(displayList[(int)(((float)tileEntity.structure.fluidStored.amount/(float)tileEntity.clientCapacity)*((float)getStages(data.height)-1))]);
}
if(tileEntity.structure.fluidStored.getFluid() == FluidRegistry.LAVA)
{