001package net.minecraft.block;
002
003import cpw.mods.fml.relauncher.Side;
004import cpw.mods.fml.relauncher.SideOnly;
005import java.util.Random;
006import net.minecraft.block.material.Material;
007import net.minecraft.creativetab.CreativeTabs;
008import net.minecraft.item.Item;
009import net.minecraft.util.Icon;
010
011public class BlockBookshelf extends Block
012{
013    public BlockBookshelf(int par1)
014    {
015        super(par1, Material.wood);
016        this.setCreativeTab(CreativeTabs.tabBlock);
017    }
018
019    @SideOnly(Side.CLIENT)
020
021    /**
022     * From the specified side and block metadata retrieves the blocks texture. Args: side, metadata
023     */
024    public Icon getBlockTextureFromSideAndMetadata(int par1, int par2)
025    {
026        return par1 != 1 && par1 != 0 ? super.getBlockTextureFromSideAndMetadata(par1, par2) : Block.planks.getBlockTextureFromSide(par1);
027    }
028
029    /**
030     * Returns the quantity of items to drop on block destruction.
031     */
032    public int quantityDropped(Random par1Random)
033    {
034        return 3;
035    }
036
037    /**
038     * Returns the ID of the items to drop on destruction.
039     */
040    public int idDropped(int par1, Random par2Random, int par3)
041    {
042        return Item.book.itemID;
043    }
044}