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 Enchantment

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

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

    public abstract class Enchantment

extends Object

Field Summary
`static Enchantment` | `aquaAffinity` Increases underwater mining rate
`static Enchantment` | `baneOfArthropods` Extra damage to spiders, cave spiders and silverfish
`static Enchantment` | `blastProtection` Protection against explosions
`int` | `effectId`
`static Enchantment` | `efficiency` Faster resource gathering while in use
`static Enchantment[]` | `enchantmentsList`
`static Enchantment` | `featherFalling` Less fall damage
`static Enchantment` | `fireAspect` Lights mobs on fire
`static Enchantment` | `fireProtection` Protection against fire
`static Enchantment` | `flame` Flame enchantment for bows.
`static Enchantment` | `fortune` Can multiply the drop rate of items from blocks
`static Enchantment` | `infinity` Infinity enchantment for bows.
`static Enchantment` | `knockback` Knocks mob and players backwards upon hit
`static Enchantment` | `looting` Mobs have a chance to drop more loot
`static Enchantment` | `power` Power enchantment for bows, add's extra damage to arrows.
`static Enchantment` | `projectileProtection` Protection against projectile entities (e.g.
`static Enchantment` | `protection` Converts environmental damage to armour damage
`static Enchantment` | `punch` Knockback enchantments for bows, the arrows will knockback the target when hit.
`static Enchantment` | `respiration` Decreases the rate of air loss underwater; increases time between damage while suffocating
`static Enchantment` | `sharpness` Extra damage to mobs
`static Enchantment` | `silkTouch` Blocks mined will drop themselves, even if it should drop something else (e.g.
`static Enchantment` | `smite` Extra damage to zombies, zombie pigmen and skeletons
`EnumEnchantmentType` | `type` The EnumEnchantmentType given to this Enchantment.
`static Enchantment` | `unbreaking` Sometimes, the tool's durability will not be spent when the tool is used

Method Summary
`int` | `calcModifierDamage(int par1, DamageSource par2DamageSource)` Calculates de damage protection of the enchantment based on level and damage source passed.
`int` | `calcModifierLiving(int par1, EntityLiving par2EntityLiving)` Calculates de (magic) damage done by the enchantment on a living entity based on level and entity passed.
`boolean` | `canApplyTogether(Enchantment par1Enchantment)` Determines if the enchantment passed can be applyied together with this enchantment.
`boolean` | `canEnchantItem(ItemStack item)` Called to determine if this enchantment can be applied to a ItemStack
`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.
`int` | `getMinLevel()` Returns the minimum level that the enchantment can have.
`String` | `getName()`
`String` | `getTranslatedName(int par1)`
`int` | `getWeight()`
`Enchantment` | `setName(String par1Str)` Sets the enchantment name

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

Field Detail

### enchantmentsList

    public static final Enchantment[] enchantmentsList

### protection

    public static final Enchantment protection

  Converts environmental damage to armour damage

### fireProtection

    public static final Enchantment fireProtection

  Protection against fire

### featherFalling

    public static final Enchantment featherFalling

  Less fall damage

### blastProtection

    public static final Enchantment blastProtection

  Protection against explosions

### projectileProtection

    public static final Enchantment projectileProtection

  Protection against projectile entities (e.g. arrows)

### respiration

    public static final Enchantment respiration

  Decreases the rate of air loss underwater; increases time between damage while suffocating

### aquaAffinity

    public static final Enchantment aquaAffinity

  Increases underwater mining rate

### sharpness

    public static final Enchantment sharpness

  Extra damage to mobs

### smite

    public static final Enchantment smite

  Extra damage to zombies, zombie pigmen and skeletons

### baneOfArthropods

    public static final Enchantment baneOfArthropods

  Extra damage to spiders, cave spiders and silverfish

### knockback

    public static final Enchantment knockback

  Knocks mob and players backwards upon hit

### fireAspect

    public static final Enchantment fireAspect

  Lights mobs on fire

### looting

    public static final Enchantment looting

  Mobs have a chance to drop more loot

### efficiency

    public static final Enchantment efficiency

  Faster resource gathering while in use

### silkTouch

    public static final Enchantment silkTouch

  Blocks mined will drop themselves, even if it should drop something else (e.g. stone will drop stone, not cobblestone)

### unbreaking

    public static final Enchantment unbreaking

  Sometimes, the tool's durability will not be spent when the tool is used

### fortune

    public static final Enchantment fortune

  Can multiply the drop rate of items from blocks

### power

    public static final Enchantment power

  Power enchantment for bows, add's extra damage to arrows.

### punch

    public static final Enchantment punch

  Knockback enchantments for bows, the arrows will knockback the target when hit.

### flame

    public static final Enchantment flame

  Flame enchantment for bows. Arrows fired by the bow will be on fire. Any target hit will also set on fire.

### infinity

    public static final Enchantment infinity

  Infinity enchantment for bows. The bow will not consume arrows anymore, but will still required at least one arrow on inventory use the bow.

### effectId

    public final int effectId

### type

    public EnumEnchantmentType type

  The EnumEnchantmentType given to this Enchantment.

Method Detail

### getWeight

    public int getWeight()

### getMinLevel

    public int getMinLevel()

  Returns the minimum level that the enchantment can have.

### getMaxLevel

    public int getMaxLevel()

  Returns the maximum level that the enchantment can have.

### getMinEnchantability

    public int getMinEnchantability(int par1)

  Returns the minimal value of enchantability needed on the enchantment level passed.

### getMaxEnchantability

    public int getMaxEnchantability(int par1)

  Returns the maximum value of enchantability nedded on the enchantment level passed.

### calcModifierDamage

    public int calcModifierDamage(int par1,
                                  DamageSource par2DamageSource)

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

### calcModifierLiving

    public int calcModifierLiving(int par1,
                                  EntityLiving par2EntityLiving)

  Calculates de (magic) damage done by the enchantment on a living entity based on level and entity passed.

### canApplyTogether

    public boolean canApplyTogether(Enchantment par1Enchantment)

  Determines if the enchantment passed can be applyied together with this enchantment.

### setName

    public Enchantment setName(String par1Str)

  Sets the enchantment name

### getName

    public String getName()

### getTranslatedName

    public String getTranslatedName(int par1)

### canEnchantItem

    public boolean canEnchantItem(ItemStack item)

  Called to determine if this enchantment can be applied to a ItemStack

  Parameters:
    `item` - The ItemStack that the enchantment might be put on
  Returns:
    True if the item is valid, false otherwise

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