    001    package net.minecraft.src;
    002
    003    public class BlockPotato extends BlockCrops
    004    {
    005        public BlockPotato(int par1)
    006        {
    007            super(par1, 200);
    008        }
    009
    010        /**
    011         * From the specified side and block metadata retrieves the blocks texture. Args: side, metadata
    012         */
    013        public int getBlockTextureFromSideAndMetadata(int par1, int par2)
    014        {
    015            if (par2 < 7)
    016            {
    017                if (par2 == 6)
    018                {
    019                    par2 = 5;
    020                }
    021
    022                return this.blockIndexInTexture + (par2 >> 1);
    023            }
    024            else
    025            {
    026                return this.blockIndexInTexture + 4;
    027            }
    028        }
    029
    030        protected int func_82532_h()
    031        {
    032            return Item.field_82794_bL.shiftedIndex;
    033        }
    034
    035        protected int func_82533_j()
    036        {
    037            return Item.field_82794_bL.shiftedIndex;
    038        }
    039
    040        /**
    041         * Drops the block items with a specified chance of dropping the specified items
    042         */
    043        public void dropBlockAsItemWithChance(World par1World, int par2, int par3, int par4, int par5, float par6, int par7)
    044        {
    045            super.dropBlockAsItemWithChance(par1World, par2, par3, par4, par5, par6, 0);
    046
    047            if (!par1World.isRemote)
    048            {
    049                if (par5 >= 7 && par1World.rand.nextInt(50) == 0)
    050                {
    051                    this.dropBlockAsItem_do(par1World, par2, par3, par4, new ItemStack(Item.field_82800_bN));
    052                }
    053            }
    054        }
    055    }