package net.minecraft.block;
import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;
import java.util.List;
import java.util.Random;
import net.minecraft.block.material.Material;
import net.minecraft.client.renderer.texture.IIconRegister;
import net.minecraft.creativetab.CreativeTabs;
import net.minecraft.init.Blocks;
import net.minecraft.item.Item;
import net.minecraft.item.ItemStack;
import net.minecraft.util.IIcon;
public class BlockWoodSlab extends BlockSlab
{
public static final String[] field_150005_b = new String[] {"oak", "spruce", "birch", "jungle", "acacia", "big_oak"};
private static final String __OBFID = "CL_00000337";
public BlockWoodSlab(boolean p_i45437_1_)
{
super(p_i45437_1_, Material.wood);
this.setCreativeTab(CreativeTabs.tabBlock);
}
/**
* Gets the block's texture. Args: side, meta
*/
@SideOnly(Side.CLIENT)
public IIcon getIcon(int side, int meta)
{
return Blocks.planks.getIcon(side, meta & 7);
}
public Item getItemDropped(int meta, Random random, int fortune)
{
return Item.getItemFromBlock(Blocks.wooden_slab);
}
/**
* Returns an item stack containing a single instance of the current block type. 'i' is the block's subtype/damage
* and is ignored for blocks which do not support subtypes. Blocks which cannot be harvested should return null.
*/
protected ItemStack createStackedBlock(int meta)
{
return new ItemStack(Item.getItemFromBlock(Blocks.wooden_slab), 2, meta & 7);
}
/**
* Returns the slab block name with the type associated with it
*/
public String getFullSlabName(int p_150002_1_)
{
if (p_150002_1_ < 0 || p_150002_1_ >= field_150005_b.length)
{
p_150002_1_ = 0;
}
return super.getUnlocalizedName() + "." + field_150005_b[p_150002_1_];
}
/**
* returns a list of blocks with the same ID, but different meta (eg: wood returns 4 blocks)
*/
@SideOnly(Side.CLIENT)
public void getSubBlocks(Item itemIn, CreativeTabs tab, List list)
{
if (itemIn != Item.getItemFromBlock(Blocks.double_wooden_slab))
{
for (int i = 0; i < field_150005_b.length; ++i)
{
list.add(new ItemStack(itemIn, 1, i));
}
}
}
@SideOnly(Side.CLIENT)
public void registerIcons(IIconRegister reg) {}
}