package JAKJ . RedstoneInMotion ;

public abstract class Block extends net . minecraft . block . Block
{
	public Block ( int Id , net . minecraft . block . Block Template , Class < ? extends BlockItem > BlockItemClass )
	{
		super ( Id , new net . minecraft . block . material . Material ( Template . blockMaterial . materialMapColor ) ) ;

		setUnlocalizedName ( Core . Handle + "_" + getClass ( ) . getSimpleName ( ) ) ;

		setHardness ( Template . blockHardness ) ;

		setStepSound ( Template . stepSound ) ;

		cpw . mods . fml . common . registry . GameRegistry . registerBlock ( this , BlockItemClass , getUnlocalizedName ( ) , Core . Handle ) ;
	}

	public static void RegisterTileEntity ( Class < ? extends TileEntity > TileEntityClass )
	{
		cpw . mods . fml . common . registry . GameRegistry . registerTileEntity ( TileEntityClass , Core . Handle + "_" + TileEntityClass . getSimpleName ( ) ) ;
	}

	public abstract static class HarvestToolTypes
	{
		public static String Pickaxe = "pickaxe" ;

		public static String Hatchet = "axe" ;
	}

	public Block ( int Id , net . minecraft . block . Block Template , Class < ? extends BlockItem > BlockItemClass , String HarvestToolType )
	{
		this ( Id , Template , BlockItemClass ) ;

		net . minecraftforge . common . MinecraftForge . setBlockHarvestLevel ( this , HarvestToolType , 0 ) ;

		setCreativeTab ( CreativeTab . Instance ) ;
	}

	public static net . minecraft . block . Block Get ( int Id )
	{
		return ( net . minecraft . block . Block . blocksList [ Id ] ) ;
	}

	public void AddShowcaseStacks ( java . util . List Showcase )
	{
	}

	@Override
	public void getSubBlocks ( int Id , net . minecraft . creativetab . CreativeTabs CreativeTab , java . util . List Showcase )
	{
		AddShowcaseStacks ( Showcase ) ;
	}

	@Override
	public int quantityDropped ( int Meta , int Fortune , java . util . Random Random )
	{
		return ( 0 ) ;
	}

	@Override
	public void onBlockPlacedBy ( net . minecraft . world . World World , int X , int Y , int Z , net . minecraft . entity . EntityLivingBase Entity , net . minecraft . item . ItemStack Item )
	{
		try
		{
			( ( TileEntity ) World . getBlockTileEntity ( X , Y , Z ) ) . Setup ( ( net . minecraft . entity . player . EntityPlayer ) Entity , Item ) ;
		}
		catch ( Throwable Throwable )
		{
			Throwable . printStackTrace ( ) ;
		}
	}

	@Override
	public boolean removeBlockByPlayer ( net . minecraft . world . World World , net . minecraft . entity . player . EntityPlayer Player , int X , int Y , int Z )
	{
		if ( ! World . isRemote )
		{
			if ( ! Player . capabilities . isCreativeMode )
			{
				try
				{
					( ( TileEntity ) World . getBlockTileEntity ( X , Y , Z ) ) . EmitDrops ( this , World . getBlockMetadata ( X , Y , Z ) ) ;
				}
				catch ( Throwable Throwable )
				{
					Throwable . printStackTrace ( ) ;
				}
			}
		}

		return ( super . removeBlockByPlayer ( World , Player , X , Y , Z ) ) ;
	}
}
