    001package net.minecraft.enchantment;
    002
    003public class EnchantmentLootBonus extends Enchantment
    004{
    005    protected EnchantmentLootBonus(int par1, int par2, EnumEnchantmentType par3EnumEnchantmentType)
    006    {
    007        super(par1, par2, par3EnumEnchantmentType);
    008        this.setName("lootBonus");
    009
    010        if (par3EnumEnchantmentType == EnumEnchantmentType.digger)
    011        {
    012            this.setName("lootBonusDigger");
    013        }
    014    }
    015
    016    /**
    017     * Returns the minimal value of enchantability needed on the enchantment level passed.
    018     */
    019    public int getMinEnchantability(int par1)
    020    {
    021        return 15 + (par1 - 1) * 9;
    022    }
    023
    024    /**
    025     * Returns the maximum value of enchantability nedded on the enchantment level passed.
    026     */
    027    public int getMaxEnchantability(int par1)
    028    {
    029        return super.getMinEnchantability(par1) + 50;
    030    }
    031
    032    /**
    033     * Returns the maximum level that the enchantment can have.
    034     */
    035    public int getMaxLevel()
    036    {
    037        return 3;
    038    }
    039
    040    /**
    041     * Determines if the enchantment passed can be applyied together with this enchantment.
    042     */
    043    public boolean canApplyTogether(Enchantment par1Enchantment)
    044    {
    045        return super.canApplyTogether(par1Enchantment) && par1Enchantment.effectId != silkTouch.effectId;
    046    }
    047}