001    package net.minecraft.src;
002    
003    import java.util.Random;
004    
005    public class BlockSnowBlock extends Block
006    {
007        protected BlockSnowBlock(int par1, int par2)
008        {
009            super(par1, par2, Material.craftedSnow);
010            this.setTickRandomly(true);
011            this.setCreativeTab(CreativeTabs.tabBlock);
012        }
013    
014        /**
015         * Returns the ID of the items to drop on destruction.
016         */
017        public int idDropped(int par1, Random par2Random, int par3)
018        {
019            return Item.snowball.shiftedIndex;
020        }
021    
022        /**
023         * Returns the quantity of items to drop on block destruction.
024         */
025        public int quantityDropped(Random par1Random)
026        {
027            return 4;
028        }
029    
030        /**
031         * Ticks the block if it's been scheduled
032         */
033        public void updateTick(World par1World, int par2, int par3, int par4, Random par5Random)
034        {
035            if (par1World.getSavedLightValue(EnumSkyBlock.Block, par2, par3, par4) > 11)
036            {
037                this.dropBlockAsItem(par1World, par2, par3, par4, par1World.getBlockMetadata(par2, par3, par4), 0);
038                par1World.setBlockWithNotify(par2, par3, par4, 0);
039            }
040        }
041    }