}
public boolean renderSmeltery (IBlockAccess world, int x, int y, int z, Block block, int modelID, RenderBlocks renderer)
{
renderer.renderStandardBlock(block, x, y, z);
SmelteryLogic logic = (SmelteryLogic) world.getTileEntity(x, y, z);
if (logic.validStructure)
{
CoordTuple from = logic.minPos;
CoordTuple to = logic.maxPos;
//Melting
if (logic.getSizeInventory() > 0)
{
for (int i = 0; i < logic.layers; i++)
{
renderLayer(logic, i * logic.getBlocksPerLayer(), from, to, from.y + i, renderer, world);
}
}
//Liquids
float base = 0F;
int yBase = 0;
int liquidBase = 0;
for (FluidStack liquid : logic.moltenMetal)
{
int liquidSize = liquid.amount;
while (liquidSize > 0)
{
int cap = logic.getCapacityPerLayer();
int room = cap - liquidBase;
int countSize = liquidSize > room ? room : liquidSize;
liquidSize -= countSize;
float height = countSize > cap ? 1.0F : (float) countSize / (float) cap;