Package net.minecraft.src
Class EnchantmentHelper
java.lang.Object
net.minecraft.src.EnchantmentHelper
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic ItemStackaddRandomEnchantment(Random par0Random, ItemStack par1ItemStack, int par2) // +++START EDIT+++ // ---END EDIT--- Adds a random enchantment to the specified item.static ListbuildEnchantmentList(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 intcalcItemStackEnchantability(Random rand, int iTableSlotNum, int iNumBookShelves, ItemStack stack) static intfunc_92098_i(EntityLivingBase par0EntityLivingBase) static ItemStackfunc_92099_a(Enchantment par0Enchantment, EntityLivingBase par1EntityLivingBase) static booleangetAquaAffinityModifier(EntityLivingBase par0EntityLivingBase) Returns the aqua affinity status of enchantments on current equipped item of player.static intgetEfficiencyModifier(EntityLivingBase par0EntityLivingBase) Return the extra efficiency of tools based on enchantments on equipped player item.static intgetEnchantmentLevel(int par0, ItemStack par1ItemStack) Returns the level of enchantment on the ItemStack passed.static intgetEnchantmentModifierDamage(ItemStack[] par0ArrayOfItemStack, DamageSource par1DamageSource) Returns the modifier of protection enchantments on armors equipped on player.static floatgetEnchantmentModifierLiving(EntityLivingBase par0EntityLivingBase, EntityLivingBase par1EntityLivingBase) Return the (magic) extra damage of the enchantments on player equipped item.static MapgetEnchantments(ItemStack par0ItemStack) Return the enchantments for the specified stack.static intgetFireAspectModifier(EntityLivingBase par0EntityLivingBase) static intgetFortuneModifier(EntityLivingBase par0EntityLivingBase) Returns the fortune enchantment modifier of the current equipped item of player.static intgetKnockbackModifier(EntityLivingBase par0EntityLivingBase, EntityLivingBase par1EntityLivingBase) Returns the knockback value of enchantments on equipped player item.static intgetLootingModifier(EntityLivingBase par0EntityLivingBase) Returns the looting enchantment modifier of the current equipped item of player.static intgetMaxEnchantmentLevel(int par0, ItemStack[] par1ArrayOfItemStack) Returns the biggest level of the enchantment on the array of ItemStack passed.static intgetRespiration(EntityLivingBase par0EntityLivingBase) Returns the 'Water Breathing' modifier of enchantments on player equipped armors.static booleangetSilkTouchModifier(EntityLivingBase par0EntityLivingBase) Returns the silk touch status of enchantments on current equipped item of player.static MapmapEnchantmentData(int par0, ItemStack par1ItemStack) Creates a 'Map' of EnchantmentData (enchantments) possible to add on the ItemStack and the enchantability level passed.static voidsetEnchantments(Map par0Map, ItemStack par1ItemStack) Set the enchantments for the specified stack.
-
Constructor Details
-
EnchantmentHelper
public EnchantmentHelper()
-
-
Method Details
-
getEnchantmentLevel
Returns the level of enchantment on the ItemStack passed. -
getEnchantments
Return the enchantments for the specified stack. -
setEnchantments
Set the enchantments for the specified stack. -
getMaxEnchantmentLevel
Returns the biggest level of the enchantment on the array of ItemStack passed. -
getEnchantmentModifierDamage
public static int getEnchantmentModifierDamage(ItemStack[] par0ArrayOfItemStack, DamageSource par1DamageSource) Returns the modifier of protection enchantments on armors equipped on player. -
getEnchantmentModifierLiving
public static float getEnchantmentModifierLiving(EntityLivingBase par0EntityLivingBase, EntityLivingBase par1EntityLivingBase) Return the (magic) extra damage of the enchantments on player equipped item. -
getKnockbackModifier
public static int getKnockbackModifier(EntityLivingBase par0EntityLivingBase, EntityLivingBase par1EntityLivingBase) Returns the knockback value of enchantments on equipped player item. -
getFireAspectModifier
-
getRespiration
Returns the 'Water Breathing' modifier of enchantments on player equipped armors. -
getEfficiencyModifier
Return the extra efficiency of tools based on enchantments on equipped player item. -
getSilkTouchModifier
Returns the silk touch status of enchantments on current equipped item of player. -
getFortuneModifier
Returns the fortune enchantment modifier of the current equipped item of player. -
getLootingModifier
Returns the looting enchantment modifier of the current equipped item of player. -
getAquaAffinityModifier
Returns the aqua affinity status of enchantments on current equipped item of player. -
func_92098_i
-
func_92099_a
public static ItemStack func_92099_a(Enchantment par0Enchantment, EntityLivingBase par1EntityLivingBase) -
addRandomEnchantment
// +++START EDIT+++ // ---END EDIT--- Adds a random enchantment to the specified item. Args: random, itemStack, enchantabilityLevel -
buildEnchantmentList
Create a list of random EnchantmentData (enchantments) that can be added together to the ItemStack, the 3rd parameter is the total enchantability level. -
mapEnchantmentData
Creates a 'Map' of EnchantmentData (enchantments) possible to add on the ItemStack and the enchantability level passed. -
calcItemStackEnchantability
-