/** Returns if the item (tool) can harvest results from the block type. */ @Override public boolean canHarvestBlock(Block par1Block, ItemStack par2ItemStack) { return par1Block == SoulBlocks.Baneberry.get() || par1Block == SoulBlocks.Blackberry.get() || par1Block == SoulBlocks.Blueberry.get() || par1Block == SoulBlocks.Cranberry.get() || par1Block == SoulBlocks.Raspberry.get() || par1Block == SoulBlocks.Razzberry.get() || par1Block == SoulBlocks.Strawberry.get() || par1Block == SoulBlocks.GrapesLeaves.get() || par1Block == SoulBlocks.SoulLeaves.get() || par1Block == SoulBlocks.HardwoodLeaves.get(); }
/** * Returns the strength of the stack against a given block. 1.0F base, (Quality+1)*2 if correct * blocktype, 1.5F if sword */ @Override public float getDigSpeed(ItemStack par1ItemStack, Block par2Block, int metadeta) { return par2Block != SoulBlocks.Baneberry.get() && par2Block != SoulBlocks.Blackberry.get() && par2Block != SoulBlocks.Blueberry.get() && par2Block != SoulBlocks.Cranberry.get() && par2Block != SoulBlocks.Raspberry.get() && par2Block != SoulBlocks.Razzberry.get() && par2Block != SoulBlocks.Strawberry.get() ? (par2Block == SoulBlocks.GrapesLeaves.get() || par2Block == SoulBlocks.SoulLeaves.get() || par2Block == SoulBlocks.HardwoodLeaves.get() ? 15.0F : super.getDigSpeed(par1ItemStack, par2Block, metadeta)) : 5.0F; }
@Override public boolean onBlockDestroyed( ItemStack par1ItemStack, World par2World, Block par3, int par4, int par5, int par6, EntityLivingBase par7EntityLiving) { if (par3 != SoulBlocks.Baneberry.get() && par3 != SoulBlocks.Blackberry.get() && par3 != SoulBlocks.Blueberry.get() && par3 != SoulBlocks.Cranberry.get() && par3 != SoulBlocks.Raspberry.get() && par3 != SoulBlocks.Razzberry.get() && par3 != SoulBlocks.Strawberry.get() && par3 != SoulBlocks.GrapesLeaves.get()) { return super.onBlockDestroyed( par1ItemStack, par2World, par3, par4, par5, par6, par7EntityLiving); } else { return true; } }