package com.zivilon.cinder_loe.blocks;

import com.zivilon.cinder_loe.LoECreativeTabs;
import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;

import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;
import net.minecraft.block.Block;
import net.minecraft.block.BlockPane;
import net.minecraft.creativetab.CreativeTabs;
import net.minecraft.block.material.Material;
import net.minecraft.client.renderer.texture.IIconRegister;
import net.minecraft.util.IIcon;

import lotr.common.LOTRCreativeTabs;
import lotr.common.block.LOTRBlockOrcChain;
import lotr.common.block.LOTRBlockPane;

import com.zivilon.cinder_loe.util.Utilities;

public abstract class BarsBase extends BlockPane {
    public String textureName;
    protected IIcon icon;

    public BarsBase(String blockName) {
        super("", "", Material.iron, true);
        this.textureName = Utilities.toSnakeCase(blockName);
        this.setBlockName(blockName);
        this.setCreativeTab(LoECreativeTabs.tabBlockLoE);
        setHardness(5.0F);
        setResistance(10.0F);
        setStepSound(Block.soundTypeMetal);
    }

    public void registerBlockIcons(IIconRegister iconregister) {
        this.icon = iconregister.registerIcon(textureName);
        System.out.println("Registering texture " + textureName);
    }

    public IIcon getIcon() {
        return this.icon;
    }

    public IIcon getIcon(int i, int j) {
        return this.icon;
    }

    public IIcon func_150097_e() {
        return this.icon;
    }
}