001 package net.minecraft.src; 002 003 public class ItemSpade extends ItemTool 004 { 005 /** an array of the blocks this spade is effective against */ 006 public static final Block[] blocksEffectiveAgainst = new Block[] {Block.grass, Block.dirt, Block.sand, Block.gravel, Block.snow, Block.blockSnow, Block.blockClay, Block.tilledField, Block.slowSand, Block.mycelium}; 007 008 public ItemSpade(int par1, EnumToolMaterial par2EnumToolMaterial) 009 { 010 super(par1, 1, par2EnumToolMaterial, blocksEffectiveAgainst); 011 } 012 013 /** 014 * Returns if the item (tool) can harvest results from the block type. 015 */ 016 public boolean canHarvestBlock(Block par1Block) 017 { 018 return par1Block == Block.snow ? true : par1Block == Block.blockSnow; 019 } 020 }