Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## net.minecraft.src
Class EnchantmentProtection

    java.lang.Object
      net.minecraft.src.Enchantment
          net.minecraft.src.EnchantmentProtection

    public class EnchantmentProtection

extends Enchantment

Field Summary
`int` | `protectionType` Defines the type of protection of the enchantment, 0 = all, 1 = fire, 2 = fall (feather fall), 3 = explosion and 4 = projectile.

Fields inherited from class net.minecraft.src.Enchantment
`aquaAffinity, baneOfArthropods, blastProtection, effectId, efficiency, enchantmentsList, featherFalling, fireAspect, fireProtection, flame, fortune, infinity, knockback, looting, power, projectileProtection, protection, punch, respiration, sharpness, silkTouch, smite, type, unbreaking`

Constructor Summary
`EnchantmentProtection(int par1, int par2, int par3)`

Method Summary
`int` | `calcModifierDamage(int par1, DamageSource par2DamageSource)` Calculates de damage protection of the enchantment based on level and damage source passed.
`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()`

Methods inherited from class net.minecraft.src.Enchantment
`calcModifierLiving, canEnchantItem, getMinLevel, getTranslatedName, getWeight, setName`

Methods inherited from class java.lang.Object
`equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Field Detail

### protectionType

    public final int protectionType

  Defines the type of protection of the enchantment, 0 = all, 1 = fire, 2 = fall (feather fall), 3 = explosion and 4 = projectile.

Constructor Detail

### EnchantmentProtection

    public EnchantmentProtection(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`

### calcModifierDamage

    public int calcModifierDamage(int par1,
                                  DamageSource par2DamageSource)

  Calculates de damage protection of the enchantment based on level and damage source passed.

  Overrides:
    `calcModifierDamage` in class `Enchantment`

### getName

    public String getName()

  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`

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD