    001package net.minecraft.enchantment;
    002
    003import net.minecraft.item.Item;
    004import net.minecraft.item.ItemStack;
    005
    006public class EnchantmentDigging extends Enchantment
    007{
    008    protected EnchantmentDigging(int par1, int par2)
    009    {
    010        super(par1, par2, EnumEnchantmentType.digger);
    011        this.setName("digging");
    012    }
    013
    014    /**
    015     * Returns the minimal value of enchantability needed on the enchantment level passed.
    016     */
    017    public int getMinEnchantability(int par1)
    018    {
    019        return 1 + 10 * (par1 - 1);
    020    }
    021
    022    /**
    023     * Returns the maximum value of enchantability nedded on the enchantment level passed.
    024     */
    025    public int getMaxEnchantability(int par1)
    026    {
    027        return super.getMinEnchantability(par1) + 50;
    028    }
    029
    030    /**
    031     * Returns the maximum level that the enchantment can have.
    032     */
    033    public int getMaxLevel()
    034    {
    035        return 5;
    036    }
    037
    038    public boolean func_92089_a(ItemStack par1ItemStack)
    039    {
    040        return par1ItemStack.getItem().itemID == Item.shears.itemID ? true : super.func_92089_a(par1ItemStack);
    041    }
    042}