Class Enchantment

    • Field Detail

      • enchantmentsBookList

        public static final Enchantment[] enchantmentsBookList
      • protection

        public static final Enchantment protection
      • fireProtection

        public static final Enchantment fireProtection
        + Protection against fire
      • featherFalling

        public static final Enchantment featherFalling
      • blastProtection

        public static final Enchantment blastProtection
        + Protection against explosions
      • projectileProtection

        public static final Enchantment projectileProtection
      • respiration

        public static final Enchantment respiration
      • aquaAffinity

        public static final Enchantment aquaAffinity
        + Increases underwater mining rate
      • depthStrider

        public static final Enchantment depthStrider
      • baneOfArthropods

        public static final Enchantment baneOfArthropods
      • 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.
      • luckOfTheSea

        public static final Enchantment luckOfTheSea
      • effectId

        public final int effectId
      • name

        protected java.lang.String name
    • Method Detail

      • getEnchantmentById

        public static Enchantment getEnchantmentById​(int enchID)
        + Retrieves an Enchantment from the enchantmentsList
      • loadPluginData

        public void loadPluginData​(BaseData data)
      • makePluginData

        public PluginData makePluginData()
      • makePluginDataStatic

        public static PluginData makePluginDataStatic()
      • getEnchantmentByLocation

        public static Enchantment getEnchantmentByLocation​(java.lang.String location)
        + Retrieves an enchantment by using its location name.
      • getWeight

        public int getWeight()
        + Retrieves the weight value of an Enchantment. This weight value is used within vanilla to determine how rare an enchantment is.
      • 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 i)
        + Returns the minimal value of enchantability needed on the enchantment level passed.
      • getMaxEnchantability

        public int getMaxEnchantability​(int i)
        + Returns the maximum value of enchantability nedded on the enchantment level passed.
      • calcModifierDamage

        public int calcModifierDamage​(int level,
                                      DamageSource source)
        + Calculates the damage protection of the enchantment based on level and damage source passed.
      • calcDamageByCreature

        public float calcDamageByCreature​(int var1,
                                          EnumCreatureAttribute var2)
        + Calculates the additional damage that will be dealt by an item with this enchantment. This alternative to calcModifierDamage is sensitive to the targets EnumCreatureAttribute.
      • canApplyTogether

        public boolean canApplyTogether​(Enchantment enchantment)
        + Determines if the enchantment passed can be applyied together with this enchantment.
      • setName

        public Enchantment setName​(java.lang.String enchName)
        + Sets the enchantment name
      • getName

        public java.lang.String getName()
        + Return the name of key in translation table of this enchantment.
      • getTranslatedName

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

        public boolean canApply​(ItemStack itemstack)
        + Determines if this enchantment can be applied to a specific ItemStack.
      • onEntityDamaged

        public void onEntityDamaged​(EntityLivingBase var1,
                                    Entity var2,
                                    int var3)
        + Called whenever a mob is damaged with an item that has this enchantment on it.
      • onUserHurt

        public void onUserHurt​(EntityLivingBase user,
                               Entity attacker,
                               int level)
        + Whenever an entity that has this enchantment on one of its associated items is damaged this method will be called.