001package net.minecraft.block;
002
003import cpw.mods.fml.relauncher.Side;
004import cpw.mods.fml.relauncher.SideOnly;
005import java.util.List;
006import net.minecraft.block.material.Material;
007import net.minecraft.creativetab.CreativeTabs;
008import net.minecraft.item.ItemStack;
009
010public class BlockWood extends Block
011{
012    /** The type of tree this block came from. */
013    public static final String[] woodType = new String[] {"oak", "spruce", "birch", "jungle"};
014
015    public BlockWood(int par1)
016    {
017        super(par1, 4, Material.wood);
018        this.setCreativeTab(CreativeTabs.tabBlock);
019    }
020
021    /**
022     * From the specified side and block metadata retrieves the blocks texture. Args: side, metadata
023     */
024    public int getBlockTextureFromSideAndMetadata(int par1, int par2)
025    {
026        switch (par2)
027        {
028            case 1:
029                return 198;
030            case 2:
031                return 214;
032            case 3:
033                return 199;
034            default:
035                return 4;
036        }
037    }
038
039    /**
040     * Determines the damage on the item the block drops. Used in cloth and wood.
041     */
042    public int damageDropped(int par1)
043    {
044        return par1;
045    }
046
047    @SideOnly(Side.CLIENT)
048
049    /**
050     * returns a list of blocks with the same ID, but different meta (eg: wood returns 4 blocks)
051     */
052    public void getSubBlocks(int par1, CreativeTabs par2CreativeTabs, List par3List)
053    {
054        par3List.add(new ItemStack(par1, 1, 0));
055        par3List.add(new ItemStack(par1, 1, 1));
056        par3List.add(new ItemStack(par1, 1, 2));
057        par3List.add(new ItemStack(par1, 1, 3));
058    }
059}