drawRect(xOffset, yOffset - size, xOffset + 8, yOffset, color);
}
protected void drawTank(int xOffset, int yOffset, int liquidId, int liquidMeta, int level)
{
LiquidStack stack = LiquidDictionary.getCanonicalLiquid(new LiquidStack(liquidId, 1, liquidMeta));
if(liquidId <= 0 || stack == null)
{
return;
}
ItemStack itemStack = stack.asItemStack();
Icon icon = stack.getRenderingIcon();
if (icon == null)
{
try
{
icon = itemStack.getIconIndex();
}
catch (Throwable _) {}
if (icon == null)
icon = Block.lavaMoving.getIcon(0, 0);
}
int vertOffset = 0;
while(level > 0)
{
int texHeight = 0;
if(level > 16)
{
texHeight = 16;
level -= 16;
}
else
{
texHeight = level;
level = 0;
}
mc.renderEngine.bindTexture(stack.getTextureSheet());
drawTexturedModelRectFromIcon(xOffset, yOffset - texHeight - vertOffset, icon, 16, texHeight);
vertOffset = vertOffset + 16;
}
this.mc.renderEngine.bindTexture(MineFactoryReloadedCore.guiFolder + _tileEntity.getGuiBackground());