    001    package net.minecraft.src;
    002
    003    import java.util.Random;
    004
    005    public class BlockBookshelf extends Block
    006    {
    007        public BlockBookshelf(int par1, int par2)
    008        {
    009            super(par1, par2, Material.wood);
    010            this.setCreativeTab(CreativeTabs.tabBlock);
    011        }
    012
    013        /**
    014         * Returns the block texture based on the side being looked at.  Args: side
    015         */
    016        public int getBlockTextureFromSide(int par1)
    017        {
    018            return par1 <= 1 ? 4 : this.blockIndexInTexture;
    019        }
    020
    021        /**
    022         * Returns the quantity of items to drop on block destruction.
    023         */
    024        public int quantityDropped(Random par1Random)
    025        {
    026            return 3;
    027        }
    028
    029        /**
    030         * Returns the ID of the items to drop on destruction.
    031         */
    032        public int idDropped(int par1, Random par2Random, int par3)
    033        {
    034            return Item.book.shiftedIndex;
    035        }
    036    }