package info.jbcs.minecraft.chisel;

import java.util.List;

import net.minecraft.block.Block;
import net.minecraft.block.material.Material;
import net.minecraft.client.renderer.texture.IconRegister;
import net.minecraft.creativetab.CreativeTabs;
import net.minecraft.util.Icon;

public class BlockMarble extends Block implements Carvable {
	CarvableHelper carverHelper;

	public BlockMarble(int i) {
		this(null, i, Material.rock);
	}

	public BlockMarble(String name,int i) {
		this(name, i, Material.rock);
	}

	public BlockMarble(int i, Material m) {
		this(null, i, Material.rock);
	}
	public BlockMarble(String name,int i, Material m) {
		super(name==null?i:Chisel.config.getBlock(name, i).getInt(i), m);

		carverHelper = new CarvableHelper();

		setCreativeTab(Chisel.tabChisel);
	}

	@Override
	public int variations() {
		return carverHelper.variations();
	}

	@Override
	public String description(int variationIndex) {
		return carverHelper.description(variationIndex);
	}

	@Override
	public int metadata(int variationIndex) {
		return carverHelper.metadata(variationIndex);
	}

	@Override
	public Icon getBlockTextureFromSideAndMetadata(int side, int metadata) {
		return carverHelper.getIcon(side, metadata);
	}

	@Override
	public int damageDropped(int i) {
		return i;
	}

	@Override
	public void registerIcons(IconRegister register) {
		carverHelper.registerIcons("Chisel",this,register);
	}

    @Override
	public void getSubBlocks(int blockId, CreativeTabs tabs, List list){
		carverHelper.registerSubBlocks(this,tabs,list);
    }
}
