@Override
@SideOnly(Side.CLIENT)
public Icon getBlockTexture(IBlockAccess iBlockAccess, int x, int y, int z, int side)
{
TileEntityAdvancedBatteryBox te = (TileEntityAdvancedBatteryBox) iBlockAccess.getBlockTileEntity(x, y, z);
if (te == null)
return this.icons.get("top");
if (side == te.getOutputDir().ordinal() && te.getOutputMode() != EnumAdvBattBoxMode.OFF && te.getOutputMode() != EnumAdvBattBoxMode.QUANTUM)
return this.icons.get("out");
else if (side == te.getInputDir().ordinal() && te.getInputMode() != EnumAdvBattBoxMode.OFF && te.getInputMode() != EnumAdvBattBoxMode.QUANTUM)
return this.icons.get("input");
if (side == 0 || side == 1)
return this.icons.get("top");
if (te.getMaxEnergyStored() <= 8_000)
return this.icons.get("tier1");
else if (te.getMaxEnergyStored() <= 12_000)
return this.icons.get("tier2");
else if (te.getMaxEnergyStored() <= 16_000)
return this.icons.get("tier3");
else if (te.getMaxEnergyStored() > 16_000)
return this.icons.get("tier4");
return this.icons.get("tier1");
}