net.minecraft.enchantment

## Class Enchantment

- java.lang.Object
- - net.minecraft.enchantment.Enchantment

- Direct Known Subclasses:
    EnchantmentArrowDamage, EnchantmentArrowFire, EnchantmentArrowInfinite, EnchantmentArrowKnockback, EnchantmentDamage, EnchantmentDigging, EnchantmentDurability, EnchantmentFireAspect, EnchantmentFishingSpeed, EnchantmentKnockback, EnchantmentLootBonus, EnchantmentOxygen, EnchantmentProtection, EnchantmentThorns, EnchantmentUntouching, EnchantmentWaterWorker

      public abstract class Enchantment
      extends java.lang.Object

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `static Enchantment` | `aquaAffinity`
    `static Enchantment` | `baneOfArthropods`
    `static Enchantment` | `blastProtection`
    `int` | `effectId`
    `static Enchantment` | `efficiency`
    `static Enchantment[]` | `enchantmentsBookList`
    `static Enchantment[]` | `enchantmentsList`
    `static Enchantment` | `featherFalling`
    `static Enchantment` | `field_151369_A`
    `static Enchantment` | `field_151370_z`
    `static Enchantment` | `fireAspect`
    `static Enchantment` | `fireProtection`
    `static Enchantment` | `flame`
    `static Enchantment` | `fortune`
    `static Enchantment` | `infinity`
    `static Enchantment` | `knockback`
    `static Enchantment` | `looting`
    `protected java.lang.String` | `name`
    `static Enchantment` | `power`
    `static Enchantment` | `projectileProtection`
    `static Enchantment` | `protection`
    `static Enchantment` | `punch`
    `static Enchantment` | `respiration`
    `static Enchantment` | `sharpness`
    `static Enchantment` | `silkTouch`
    `static Enchantment` | `smite`
    `static Enchantment` | `thorns`
    `EnumEnchantmentType` | `type`
    `static Enchantment` | `unbreaking`

  - ### Constructor Summary

    Constructors
    Modifier | Constructor and Description
    --- | ---
    `protected` | `Enchantment(int par1, int par2, EnumEnchantmentType par3EnumEnchantmentType)`

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `static void` | `addToBookList(Enchantment enchantment)` Add to the list of enchantments applicable by the anvil from a book
    `int` | `calcModifierDamage(int par1, DamageSource par2DamageSource)`
    `float` | `calcModifierLiving(int par1, EntityLivingBase par2EntityLivingBase)`
    `boolean` | `canApply(ItemStack par1ItemStack)`
    `boolean` | `canApplyAtEnchantingTable(ItemStack stack)` This applies specifically to applying at the enchanting table.
    `boolean` | `canApplyTogether(Enchantment par1Enchantment)`
    `void` | `func_151367_b(EntityLivingBase p_151367_1_, Entity p_151367_2_, int p_151367_3_)`
    `void` | `func_151368_a(EntityLivingBase p_151368_1_, Entity p_151368_2_, int p_151368_3_)`
    `int` | `getMaxEnchantability(int par1)`
    `int` | `getMaxLevel()`
    `int` | `getMinEnchantability(int par1)`
    `int` | `getMinLevel()`
    `java.lang.String` | `getName()`
    `java.lang.String` | `getTranslatedName(int par1)`
    `int` | `getWeight()`
    `boolean` | `isAllowedOnBooks()` Is this enchantment allowed to be enchanted on books via Enchantment Table
    `Enchantment` | `setName(java.lang.String par1Str)`

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Field Detail

    - #### enchantmentsList

          public static final Enchantment[] enchantmentsList

    - #### enchantmentsBookList

          public static final Enchantment[] enchantmentsBookList

    - #### protection

          public static final Enchantment protection

    - #### fireProtection

          public static final Enchantment fireProtection

    - #### featherFalling

          public static final Enchantment featherFalling

    - #### blastProtection

          public static final Enchantment blastProtection

    - #### projectileProtection

          public static final Enchantment projectileProtection

    - #### respiration

          public static final Enchantment respiration

    - #### aquaAffinity

          public static final Enchantment aquaAffinity

    - #### thorns

          public static final Enchantment thorns

    - #### sharpness

          public static final Enchantment sharpness

    - #### smite

          public static final Enchantment smite

    - #### baneOfArthropods

          public static final Enchantment baneOfArthropods

    - #### knockback

          public static final Enchantment knockback

    - #### fireAspect

          public static final Enchantment fireAspect

    - #### looting

          public static final Enchantment looting

    - #### efficiency

          public static final Enchantment efficiency

    - #### silkTouch

          public static final Enchantment silkTouch

    - #### unbreaking

          public static final Enchantment unbreaking

    - #### fortune

          public static final Enchantment fortune

    - #### power

          public static final Enchantment power

    - #### punch

          public static final Enchantment punch

    - #### flame

          public static final Enchantment flame

    - #### infinity

          public static final Enchantment infinity

    - #### field_151370_z

          public static final Enchantment field_151370_z

    - #### field_151369_A

          public static final Enchantment field_151369_A

    - #### effectId

          public final int effectId

    - #### type

          public EnumEnchantmentType type

    - #### name

          protected java.lang.String name

  - ### Constructor Detail

    - #### Enchantment

          protected Enchantment(int par1,
                     int par2,
                     EnumEnchantmentType par3EnumEnchantmentType)

  - ### Method Detail

    - #### getWeight

          public int getWeight()

    - #### getMinLevel

          public int getMinLevel()

    - #### getMaxLevel

          public int getMaxLevel()

    - #### getMinEnchantability

          public int getMinEnchantability(int par1)

    - #### getMaxEnchantability

          public int getMaxEnchantability(int par1)

    - #### calcModifierDamage

          public int calcModifierDamage(int par1,
                               DamageSource par2DamageSource)

    - #### calcModifierLiving

          public float calcModifierLiving(int par1,
                                 EntityLivingBase par2EntityLivingBase)

    - #### canApplyTogether

          public boolean canApplyTogether(Enchantment par1Enchantment)

    - #### setName

          public Enchantment setName(java.lang.String par1Str)

    - #### getName

          public java.lang.String getName()

    - #### getTranslatedName

          public java.lang.String getTranslatedName(int par1)

    - #### canApply

          public boolean canApply(ItemStack par1ItemStack)

    - #### func_151368_a

          public void func_151368_a(EntityLivingBase p_151368_1_,
                           Entity p_151368_2_,
                           int p_151368_3_)

    - #### func_151367_b

          public void func_151367_b(EntityLivingBase p_151367_1_,
                           Entity p_151367_2_,
                           int p_151367_3_)

    - #### canApplyAtEnchantingTable

          public boolean canApplyAtEnchantingTable(ItemStack stack)

      This applies specifically to applying at the enchanting table. The other method `canApply(ItemStack)` applies for all possible enchantments.
      Parameters:
        `stack` -
      Returns:

    - #### addToBookList

          public static void addToBookList(Enchantment enchantment)

      Add to the list of enchantments applicable by the anvil from a book
      Parameters:
        `enchantment` -

    - #### isAllowedOnBooks

          public boolean isAllowedOnBooks()

      Is this enchantment allowed to be enchanted on books via Enchantment Table
      Returns:
        false to disable the vanilla feature