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 EnchantmentHelper

    java.lang.Object
      net.minecraft.src.EnchantmentHelper

    public class EnchantmentHelper

extends Object

Constructor Summary
`EnchantmentHelper()`

Method Summary
`static ItemStack` | `addRandomEnchantment(Random par0Random, ItemStack par1ItemStack, int par2)` Adds a random enchantment to the specified item.
`static List` | `buildEnchantmentList(Random par0Random, ItemStack par1ItemStack, int par2)` Create a list of random EnchantmentData (enchantments) that can be added together to the ItemStack, the 3rd parameter is the total enchantability level.
`static int` | `calcItemStackEnchantability(Random par0Random, int par1, int par2, ItemStack par3ItemStack)` Returns the enchantability of itemstack, it's uses a singular formula for each index (2nd parameter: 0, 1 and 2), cutting to the max enchantability power of the table (3rd parameter)
`static boolean` | `getAquaAffinityModifier(InventoryPlayer par0InventoryPlayer)` Returns the aqua affinity status of enchantments on current equipped item of player.
`static int` | `getEfficiencyModifier(InventoryPlayer par0InventoryPlayer)` Return the extra efficiency of tools based on enchantments on equipped player item.
`static int` | `getEnchantmentLevel(int par0, ItemStack par1ItemStack)` Returns the level of enchantment on the ItemStack passed.
`static int` | `getEnchantmentModifierDamage(InventoryPlayer par0InventoryPlayer, DamageSource par1DamageSource)` Returns the modifier of protection enchantments on armors equipped on player.
`static int` | `getEnchantmentModifierLiving(InventoryPlayer par0InventoryPlayer, EntityLiving par1EntityLiving)` Return the (magic) extra damage of the enchantments on player equipped item.
`static int` | `getFireAspectModifier(InventoryPlayer par0InventoryPlayer, EntityLiving par1EntityLiving)` Return the fire aspect value of enchantments on equipped player item.
`static int` | `getFortuneModifier(InventoryPlayer par0InventoryPlayer)` Returns the fortune enchantment modifier of the current equipped item of player.
`static int` | `getKnockbackModifier(InventoryPlayer par0InventoryPlayer, EntityLiving par1EntityLiving)` Returns the knockback value of enchantments on equipped player item.
`static int` | `getLootingModifier(InventoryPlayer par0InventoryPlayer)` Returns the looting enchantment modifier of the current equipped item of player.
`static int` | `getRespiration(InventoryPlayer par0InventoryPlayer)` Returns the 'Water Breathing' modifier of enchantments on player equipped armors.
`static boolean` | `getSilkTouchModifier(InventoryPlayer par0InventoryPlayer)` Returns the silk touch status of enchantments on current equipped item of player.
`static int` | `getUnbreakingModifier(InventoryPlayer par0InventoryPlayer)` Returns the unbreaking enchantment modifier on current equipped item of player.
`static Map` | `mapEnchantmentData(int par0, ItemStack par1ItemStack)` Creates a 'Map' of EnchantmentData (enchantments) possible to add on the ItemStack and the enchantability level passed.

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

Constructor Detail

### EnchantmentHelper

    public EnchantmentHelper()

Method Detail

### getEnchantmentLevel

    public static int getEnchantmentLevel(int par0,
                                          ItemStack par1ItemStack)

  Returns the level of enchantment on the ItemStack passed.

### getEnchantmentModifierDamage

    public static int getEnchantmentModifierDamage(InventoryPlayer par0InventoryPlayer,
                                                   DamageSource par1DamageSource)

  Returns the modifier of protection enchantments on armors equipped on player.

### getEnchantmentModifierLiving

    public static int getEnchantmentModifierLiving(InventoryPlayer par0InventoryPlayer,
                                                   EntityLiving par1EntityLiving)

  Return the (magic) extra damage of the enchantments on player equipped item.

### getKnockbackModifier

    public static int getKnockbackModifier(InventoryPlayer par0InventoryPlayer,
                                           EntityLiving par1EntityLiving)

  Returns the knockback value of enchantments on equipped player item.

### getFireAspectModifier

    public static int getFireAspectModifier(InventoryPlayer par0InventoryPlayer,
                                            EntityLiving par1EntityLiving)

  Return the fire aspect value of enchantments on equipped player item.

### getRespiration

    public static int getRespiration(InventoryPlayer par0InventoryPlayer)

  Returns the 'Water Breathing' modifier of enchantments on player equipped armors.

### getEfficiencyModifier

    public static int getEfficiencyModifier(InventoryPlayer par0InventoryPlayer)

  Return the extra efficiency of tools based on enchantments on equipped player item.

### getUnbreakingModifier

    public static int getUnbreakingModifier(InventoryPlayer par0InventoryPlayer)

  Returns the unbreaking enchantment modifier on current equipped item of player.

### getSilkTouchModifier

    public static boolean getSilkTouchModifier(InventoryPlayer par0InventoryPlayer)

  Returns the silk touch status of enchantments on current equipped item of player.

### getFortuneModifier

    public static int getFortuneModifier(InventoryPlayer par0InventoryPlayer)

  Returns the fortune enchantment modifier of the current equipped item of player.

### getLootingModifier

    public static int getLootingModifier(InventoryPlayer par0InventoryPlayer)

  Returns the looting enchantment modifier of the current equipped item of player.

### getAquaAffinityModifier

    public static boolean getAquaAffinityModifier(InventoryPlayer par0InventoryPlayer)

  Returns the aqua affinity status of enchantments on current equipped item of player.

### calcItemStackEnchantability

    public static int calcItemStackEnchantability(Random par0Random,
                                                  int par1,
                                                  int par2,
                                                  ItemStack par3ItemStack)

  Returns the enchantability of itemstack, it's uses a singular formula for each index (2nd parameter: 0, 1 and 2), cutting to the max enchantability power of the table (3rd parameter)

### addRandomEnchantment

    public static ItemStack addRandomEnchantment(Random par0Random,
                                                 ItemStack par1ItemStack,
                                                 int par2)

  Adds a random enchantment to the specified item. Args: random, itemStack, enchantabilityLevel

### buildEnchantmentList

    public static List buildEnchantmentList(Random par0Random,
                                            ItemStack par1ItemStack,
                                            int par2)

  Create a list of random EnchantmentData (enchantments) that can be added together to the ItemStack, the 3rd parameter is the total enchantability level.

### mapEnchantmentData

    public static Map mapEnchantmentData(int par0,
                                         ItemStack par1ItemStack)

  Creates a 'Map' of EnchantmentData (enchantments) possible to add on the ItemStack and the enchantability level passed.

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