public class EnchantmentHelper
extends java.lang.Object
| Constructor and Description |
|---|
EnchantmentHelper() |
| Modifier and Type | Method and Description |
|---|---|
static ItemStack |
addRandomEnchantment(java.util.Random p_77504_0_,
ItemStack p_77504_1_,
int p_77504_2_)
Adds a random enchantment to the specified item.
|
static java.util.List |
buildEnchantmentList(java.util.Random p_77513_0_,
ItemStack p_77513_1_,
int p_77513_2_)
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(java.util.Random p_77514_0_,
int p_77514_1_,
int p_77514_2_,
ItemStack p_77514_3_)
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 void |
func_151384_a(EntityLivingBase p_151384_0_,
Entity p_151384_1_) |
static void |
func_151385_b(EntityLivingBase p_151385_0_,
Entity p_151385_1_) |
static int |
func_151386_g(EntityLivingBase p_151386_0_) |
static int |
func_151387_h(EntityLivingBase p_151387_0_) |
static float |
func_152377_a(ItemStack p_152377_0_,
EnumCreatureAttribute p_152377_1_) |
static ItemStack |
func_92099_a(Enchantment p_92099_0_,
EntityLivingBase p_92099_1_) |
static boolean |
getAquaAffinityModifier(EntityLivingBase p_77510_0_)
Returns the aqua affinity status of enchantments on current equipped item of player.
|
static int |
getEfficiencyModifier(EntityLivingBase p_77509_0_)
Return the extra efficiency of tools based on enchantments on equipped player item.
|
static int |
getEnchantmentLevel(int p_77506_0_,
ItemStack p_77506_1_)
Returns the level of enchantment on the ItemStack passed.
|
static int |
getEnchantmentModifierDamage(ItemStack[] p_77508_0_,
DamageSource p_77508_1_)
Returns the modifier of protection enchantments on armors equipped on player.
|
static float |
getEnchantmentModifierLiving(EntityLivingBase p_77512_0_,
EntityLivingBase p_77512_1_)
Return the (magic) extra damage of the enchantments on player equipped item.
|
static java.util.Map |
getEnchantments(ItemStack p_82781_0_)
Return the enchantments for the specified stack.
|
static int |
getFireAspectModifier(EntityLivingBase p_90036_0_) |
static int |
getFortuneModifier(EntityLivingBase p_77517_0_)
Returns the fortune enchantment modifier of the current equipped item of player.
|
static int |
getKnockbackModifier(EntityLivingBase p_77507_0_,
EntityLivingBase p_77507_1_)
Returns the knockback value of enchantments on equipped player item.
|
static int |
getLootingModifier(EntityLivingBase p_77519_0_)
Returns the looting enchantment modifier of the current equipped item of player.
|
static int |
getMaxEnchantmentLevel(int p_77511_0_,
ItemStack[] p_77511_1_)
Returns the biggest level of the enchantment on the array of ItemStack passed.
|
static int |
getRespiration(EntityLivingBase p_77501_0_)
Returns the 'Water Breathing' modifier of enchantments on player equipped armors.
|
static boolean |
getSilkTouchModifier(EntityLivingBase p_77502_0_)
Returns the silk touch status of enchantments on current equipped item of player.
|
static java.util.Map |
mapEnchantmentData(int p_77505_0_,
ItemStack p_77505_1_)
Creates a 'Map' of EnchantmentData (enchantments) possible to add on the ItemStack and the enchantability level
passed.
|
static void |
setEnchantments(java.util.Map p_82782_0_,
ItemStack p_82782_1_)
Set the enchantments for the specified stack.
|
public static int getEnchantmentLevel(int p_77506_0_,
ItemStack p_77506_1_)
public static java.util.Map getEnchantments(ItemStack p_82781_0_)
public static void setEnchantments(java.util.Map p_82782_0_,
ItemStack p_82782_1_)
public static int getMaxEnchantmentLevel(int p_77511_0_,
ItemStack[] p_77511_1_)
public static int getEnchantmentModifierDamage(ItemStack[] p_77508_0_, DamageSource p_77508_1_)
public static float getEnchantmentModifierLiving(EntityLivingBase p_77512_0_, EntityLivingBase p_77512_1_)
public static float func_152377_a(ItemStack p_152377_0_, EnumCreatureAttribute p_152377_1_)
public static void func_151384_a(EntityLivingBase p_151384_0_, Entity p_151384_1_)
public static void func_151385_b(EntityLivingBase p_151385_0_, Entity p_151385_1_)
public static int getKnockbackModifier(EntityLivingBase p_77507_0_, EntityLivingBase p_77507_1_)
public static int getFireAspectModifier(EntityLivingBase p_90036_0_)
public static int getRespiration(EntityLivingBase p_77501_0_)
public static int getEfficiencyModifier(EntityLivingBase p_77509_0_)
public static boolean getSilkTouchModifier(EntityLivingBase p_77502_0_)
public static int getFortuneModifier(EntityLivingBase p_77517_0_)
public static int func_151386_g(EntityLivingBase p_151386_0_)
public static int func_151387_h(EntityLivingBase p_151387_0_)
public static int getLootingModifier(EntityLivingBase p_77519_0_)
public static boolean getAquaAffinityModifier(EntityLivingBase p_77510_0_)
public static ItemStack func_92099_a(Enchantment p_92099_0_, EntityLivingBase p_92099_1_)
public static int calcItemStackEnchantability(java.util.Random p_77514_0_,
int p_77514_1_,
int p_77514_2_,
ItemStack p_77514_3_)
public static ItemStack addRandomEnchantment(java.util.Random p_77504_0_, ItemStack p_77504_1_, int p_77504_2_)
public static java.util.List buildEnchantmentList(java.util.Random p_77513_0_,
ItemStack p_77513_1_,
int p_77513_2_)
public static java.util.Map mapEnchantmentData(int p_77505_0_,
ItemStack p_77505_1_)