content: package thebetweenlands.common.item.tools;
  
  import java.util.List;
  
  import javax.annotation.Nullable;
  
  import com.google.common.collect.Multimap;
  
  import net.minecraft.block.material.Material;
  import net.minecraft.block.state.IBlockState;
  import net.minecraft.client.util.ITooltipFlag;
  import net.minecraft.entity.Entity;
  import net.minecraft.entity.ai.attributes.AttributeModifier;
  import net.minecraft.inventory.EntityEquipmentSlot;
  import net.minecraft.item.ItemAxe;
  import net.minecraft.item.ItemStack;
  import net.minecraft.world.World;
  import net.minecraftforge.fml.relauncher.Side;
  import net.minecraftforge.fml.relauncher.SideOnly;
  import thebetweenlands.api.item.CorrosionHelper;
  import thebetweenlands.api.item.IAnimatorRepairable;
  import thebetweenlands.api.item.ICorrodible;
  import thebetweenlands.common.item.BLMaterialRegistry;
  
  
  public class ItemBLAxe extends ItemAxe implements ICorrodible, IAnimatorRepairable {
  	public ItemBLAxe(ToolMaterial material) {
  		super(material, 5.0F + material.getAttackDamage(), -3.2F);
  
  		CorrosionHelper.addCorrosionPropertyOverrides(this);
  	}
  
  	@Override
  	public float getDestroySpeed(ItemStack stack, IBlockState state) {
  		Material material = state.getMaterial();
  		float str = material != Material.WOOD && material != Material.PLANTS && material != Material.VINE ? super.getDestroySpeed(stack, state) : this.efficiency;
  		str = CorrosionHelper.getDestroySpeed(str, stack, state);
  		return str; 
  	}
  	
  	@Override
  	public boolean shouldCauseBlockBreakReset(ItemStack oldStack, ItemStack newStack) {
  		return CorrosionHelper.shouldCauseBlockBreakReset(oldStack, newStack);
  	}
  	
  	@Override
  	public boolean shouldCauseReequipAnimation(ItemStack oldStack, ItemStack newStack, boolean slotChanged) {
  		return CorrosionHelper.shouldCauseReequipAnimation(oldStack, newStack, slotChanged);
  	}
  	
  	@Override
  	public void onUpdate(ItemStack itemStack, World world, Entity holder, int slot, boolean isHeldItem) {
  		CorrosionHelper.updateCorrosion(itemStack, world, holder, slot, isHeldItem);
  	}
  
  	@Override
  	public Multimap<String, AttributeModifier> getAttributeModifiers(EntityEquipmentSlot slot, ItemStack stack) {
          return CorrosionHelper.getAttributeModifiers(super.getAttributeModifiers(slot, stack), slot, stack, ATTACK_DAMAGE_MODIFIER, this.attackDamage);
  	}
  
  	@SideOnly(Side.CLIENT)
  	@Override
  	public void addInformation(ItemStack stack, @Nullable World worldIn, List<String> tooltip, ITooltipFlag flagIn) {
  		CorrosionHelper.addCorrosionTooltips(stack, tooltip, flagIn.isAdvanced());
  	}
  
  	@Override
  	public int getMinRepairFuelCost(ItemStack stack) {
  		return BLMaterialRegistry.getMinRepairFuelCost(this.toolMaterial);
  	}
  
  	@Override
  	public int getFullRepairFuelCost(ItemStack stack) {
  		return BLMaterialRegistry.getFullRepairFuelCost(this.toolMaterial);
  	}
  
  	@Override
  	public int getMinRepairLifeCost(ItemStack stack) {
  		return BLMaterialRegistry.getMinRepairLifeCost(this.toolMaterial);
  	}
  
  	@Override
  	public int getFullRepairLifeCost(ItemStack stack) {
  		return BLMaterialRegistry.getFullRepairLifeCost(this.toolMaterial);
  	}
  }
  