net.minecraft.enchantment

## Class EnchantmentDamage

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

-     public class EnchantmentDamage
      extends Enchantment

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `int` | `damageType` Defines the type of damage of the enchantment, 0 = all, 1 = undead, 3 = arthropods

    - ### Fields inherited from class net.minecraft.enchantment.Enchantment

      `aquaAffinity, baneOfArthropods, blastProtection, effectId, efficiency, enchantmentsBookList, enchantmentsList, featherFalling, fireAspect, fireProtection, flame, fortune, infinity, knockback, looting, power, projectileProtection, protection, punch, respiration, sharpness, silkTouch, smite, thorns, type, unbreaking`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `EnchantmentDamage(int par1, int par2, int par3)`

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `float` | `calcModifierLiving(int par1, EntityLivingBase par2EntityLivingBase)` Calculates de (magic) damage done by the enchantment on a living entity based on level and entity passed.
    `boolean` | `canApply(ItemStack par1ItemStack)`
    `boolean` | `canApplyTogether(Enchantment par1Enchantment)` Determines if the enchantment passed can be applyied together with this enchantment.
    `int` | `getMaxEnchantability(int par1)` Returns the maximum value of enchantability nedded on the enchantment level passed.
    `int` | `getMaxLevel()` Returns the maximum level that the enchantment can have.
    `int` | `getMinEnchantability(int par1)` Returns the minimal value of enchantability needed on the enchantment level passed.
    `String` | `getName()` Return the name of key in translation table of this enchantment.

    - ### Methods inherited from class net.minecraft.enchantment.Enchantment

      `addToBookList, calcModifierDamage, canApplyAtEnchantingTable, getMinLevel, getTranslatedName, getWeight, isAllowedOnBooks, setName`

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

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

- - ### Field Detail

    - #### damageType

          public final int damageType

      Defines the type of damage of the enchantment, 0 = all, 1 = undead, 3 = arthropods

  - ### Constructor Detail

    - #### EnchantmentDamage

          public EnchantmentDamage(int par1,
                           int par2,
                           int par3)

  - ### Method Detail

    - #### getMinEnchantability

          public int getMinEnchantability(int par1)

      Returns the minimal value of enchantability needed on the enchantment level passed.
      Overrides:
        `getMinEnchantability` in class `Enchantment`

    - #### getMaxEnchantability

          public int getMaxEnchantability(int par1)

      Returns the maximum value of enchantability nedded on the enchantment level passed.
      Overrides:
        `getMaxEnchantability` in class `Enchantment`

    - #### getMaxLevel

          public int getMaxLevel()

      Returns the maximum level that the enchantment can have.
      Overrides:
        `getMaxLevel` in class `Enchantment`

    - #### calcModifierLiving

          public float calcModifierLiving(int par1,
                                 EntityLivingBase par2EntityLivingBase)

      Calculates de (magic) damage done by the enchantment on a living entity based on level and entity passed.
      Overrides:
        `calcModifierLiving` in class `Enchantment`

    - #### getName

          public String getName()

      Return the name of key in translation table of this enchantment.
      Overrides:
        `getName` in class `Enchantment`

    - #### canApplyTogether

          public boolean canApplyTogether(Enchantment par1Enchantment)

      Determines if the enchantment passed can be applyied together with this enchantment.
      Overrides:
        `canApplyTogether` in class `Enchantment`

    - #### canApply

          public boolean canApply(ItemStack par1ItemStack)

      Overrides:
        `canApply` in class `Enchantment`