001 package net.minecraft.src; 002 003 public class ItemAxe extends ItemTool 004 { 005 /** an array of the blocks this axe is effective against */ 006 public static final Block[] blocksEffectiveAgainst = new Block[] {Block.planks, Block.bookShelf, Block.wood, Block.chest, Block.stoneDoubleSlab, Block.stoneSingleSlab, Block.pumpkin, Block.pumpkinLantern}; 007 008 protected ItemAxe(int par1, EnumToolMaterial par2EnumToolMaterial) 009 { 010 super(par1, 3, par2EnumToolMaterial, blocksEffectiveAgainst); 011 } 012 013 /** 014 * Returns the strength of the stack against a given block. 1.0F base, (Quality+1)*2 if correct blocktype, 1.5F if 015 * sword 016 */ 017 public float getStrVsBlock(ItemStack par1ItemStack, Block par2Block) 018 { 019 return par2Block != null && par2Block.blockMaterial == Material.wood ? this.efficiencyOnProperMaterial : super.getStrVsBlock(par1ItemStack, par2Block); 020 } 021 }