Class Enchantment

java.lang.Object
net.minecraft.src.Enchantment
Direct Known Subclasses:
EnchantmentArrowDamage, EnchantmentArrowFire, EnchantmentArrowInfinite, EnchantmentArrowKnockback, EnchantmentDamage, EnchantmentDigging, EnchantmentDurability, EnchantmentFireAspect, EnchantmentKnockback, EnchantmentLootBonus, EnchantmentOxygen, EnchantmentProtection, EnchantmentThorns, EnchantmentUntouching, EnchantmentWaterWorker

public abstract class Enchantment extends Object
  • Field Details

    • enchantmentsList

      public static final Enchantment[] enchantmentsList
    • enchantmentsBookList

      public static final Enchantment[] enchantmentsBookList
      The list of enchantments applicable by the anvil from a book
    • 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
    • thorns

      public static final Enchantment thorns
    • 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.
    • name

      protected String name
      Used in localisation and stats.
  • Constructor Details

    • Enchantment

      protected Enchantment(int par1, int par2, EnumEnchantmentType par3EnumEnchantmentType)
  • Method Details

    • 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 float calcModifierLiving(int par1, EntityLivingBase par2EntityLivingBase)
      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()
      Return the name of key in translation table of this enchantment.
    • getTranslatedName

      public String getTranslatedName(int par1)
      Returns the correct traslated name of the enchantment and the level in roman numbers.
    • canApply

      public boolean canApply(ItemStack par1ItemStack)
    • canBeAppliedByVanillaEnchanter

      public boolean canBeAppliedByVanillaEnchanter()