package net.minecraft.block;
import java.util.Random;
import net.minecraft.block.material.Material;
import net.minecraft.creativetab.CreativeTabs;
import net.minecraft.init.Items;
import net.minecraft.item.Item;
import net.minecraft.world.EnumSkyBlock;
import net.minecraft.world.World;
public class BlockSnowBlock extends Block
{
private static final String __OBFID = "CL_00000308";
protected BlockSnowBlock()
{
super(Material.craftedSnow);
this.setTickRandomly(true);
this.setCreativeTab(CreativeTabs.tabBlock);
}
public Item getItemDropped(int meta, Random random, int fortune)
{
return Items.snowball;
}
/**
* Returns the quantity of items to drop on block destruction.
*/
public int quantityDropped(Random random)
{
return 4;
}
/**
* Ticks the block if it's been scheduled
*/
public void updateTick(World worldIn, int x, int y, int z, Random random)
{
if (worldIn.getSavedLightValue(EnumSkyBlock.Block, x, y, z) > 11)
{
this.dropBlockAsItem(worldIn, x, y, z, worldIn.getBlockMetadata(x, y, z), 0);
worldIn.setBlockToAir(x, y, z);
}
}
}