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