Package net.minecraft.enchantment
Class EnchantmentHelper
- java.lang.Object
-
- net.minecraft.enchantment.EnchantmentHelper
-
public class EnchantmentHelper extends java.lang.Object
+ This portion of EaglercraftX contains deobfuscated Minecraft 1.8 source code. Minecraft 1.8.8 bytecode is (c) 2015 Mojang AB. "Do not distribute!" Mod Coder Pack v9.18 deobfuscation configs are (c) Copyright by the MCP Team EaglercraftX 1.8 patch files are (c) 2022-2023 LAX1DUDE. All Rights Reserved. WITH THE EXCEPTION OF PATCH FILES, MINIFIED JAVASCRIPT, AND ALL FILES NORMALLY FOUND IN AN UNMODIFIED MINECRAFT RESOURCE PACK, YOU ARE NOT ALLOWED TO SHARE, DISTRIBUTE, OR REPURPOSE ANY FILE USED BY OR PRODUCED BY THE SOFTWARE IN THIS REPOSITORY WITHOUT PRIOR PERMISSION FROM THE PROJECT AUTHOR. NOT FOR COMMERCIAL OR MALICIOUS USE (please read the 'LICENSE' file this repo's root directory for more info)
-
-
Constructor Summary
Constructors Constructor Description EnchantmentHelper()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static ItemStack
addRandomEnchantment(EaglercraftRandom parRandom, ItemStack parItemStack, int parInt1)
+ Adds a random enchantment to the specified item.static void
applyArthropodEnchantments(EntityLivingBase parEntityLivingBase, Entity parEntity)
static void
applyThornEnchantments(EntityLivingBase parEntityLivingBase, Entity parEntity)
static java.util.List<EnchantmentData>
buildEnchantmentList(EaglercraftRandom randomIn, ItemStack itemStackIn, int parInt1)
+ 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(EaglercraftRandom parRandom, int parInt1, int parInt2, ItemStack parItemStack)
+ 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 float
func_152377_a(ItemStack parItemStack, EnumCreatureAttribute parEnumCreatureAttribute)
static boolean
getAquaAffinityModifier(EntityLivingBase player)
+ Returns the aqua affinity status of enchantments on current equipped item of player.static int
getDepthStriderModifier(Entity player)
+ Returns the level of the Depth Strider enchantment.static int
getEfficiencyModifier(EntityLivingBase player)
+ Return the extra efficiency of tools based on enchantments on equipped player item.static ItemStack
getEnchantedItem(Enchantment parEnchantment, EntityLivingBase parEntityLivingBase)
static int
getEnchantmentLevel(int enchID, ItemStack stack)
+ Returns the level of enchantment on the ItemStack passed.static int
getEnchantmentModifierDamage(ItemStack[] stacks, DamageSource source)
+ Returns the modifier of protection enchantments on armors equipped on player.static java.util.Map<java.lang.Integer,java.lang.Integer>
getEnchantments(ItemStack stack)
static int
getFireAspectModifier(EntityLivingBase player)
+ Returns the fire aspect modifier of the players held item.static int
getFortuneModifier(EntityLivingBase player)
+ Returns the fortune enchantment modifier of the current equipped item of player.static int
getKnockbackModifier(EntityLivingBase player)
+ Returns the Knockback modifier of the enchantment on the players held item.static int
getLootingModifier(EntityLivingBase player)
+ Returns the looting enchantment modifier of the current equipped item of player.static int
getLuckOfSeaModifier(EntityLivingBase player)
+ Returns the level of the 'Luck Of The Sea' enchantment.static int
getLureModifier(EntityLivingBase player)
+ Returns the level of the 'Lure' enchantment on the players held item.static int
getMaxEnchantmentLevel(int enchID, ItemStack[] stacks)
+ Returns the biggest level of the enchantment on the array of ItemStack passed.static int
getRespiration(Entity player)
+ Returns the 'Water Breathing' modifier of enchantments on player equipped armors.static boolean
getSilkTouchModifier(EntityLivingBase player)
+ Returns the silk touch status of enchantments on current equipped item of player.static java.util.Map<java.lang.Integer,EnchantmentData>
mapEnchantmentData(int parInt1, ItemStack parItemStack)
static void
setEnchantments(java.util.Map<java.lang.Integer,java.lang.Integer> enchMap, ItemStack stack)
+ Set the enchantments for the specified stack.
-
-
-
Method Detail
-
getEnchantmentLevel
public static int getEnchantmentLevel(int enchID, ItemStack stack)
+ Returns the level of enchantment on the ItemStack passed.
-
getEnchantments
public static java.util.Map<java.lang.Integer,java.lang.Integer> getEnchantments(ItemStack stack)
-
setEnchantments
public static void setEnchantments(java.util.Map<java.lang.Integer,java.lang.Integer> enchMap, ItemStack stack)
+ Set the enchantments for the specified stack.
-
getMaxEnchantmentLevel
public static int getMaxEnchantmentLevel(int enchID, ItemStack[] stacks)
+ Returns the biggest level of the enchantment on the array of ItemStack passed.
-
getEnchantmentModifierDamage
public static int getEnchantmentModifierDamage(ItemStack[] stacks, DamageSource source)
+ Returns the modifier of protection enchantments on armors equipped on player.
-
func_152377_a
public static float func_152377_a(ItemStack parItemStack, EnumCreatureAttribute parEnumCreatureAttribute)
-
applyThornEnchantments
public static void applyThornEnchantments(EntityLivingBase parEntityLivingBase, Entity parEntity)
-
applyArthropodEnchantments
public static void applyArthropodEnchantments(EntityLivingBase parEntityLivingBase, Entity parEntity)
-
getKnockbackModifier
public static int getKnockbackModifier(EntityLivingBase player)
+ Returns the Knockback modifier of the enchantment on the players held item.
-
getFireAspectModifier
public static int getFireAspectModifier(EntityLivingBase player)
+ Returns the fire aspect modifier of the players held item.
-
getRespiration
public static int getRespiration(Entity player)
+ Returns the 'Water Breathing' modifier of enchantments on player equipped armors.
-
getDepthStriderModifier
public static int getDepthStriderModifier(Entity player)
+ Returns the level of the Depth Strider enchantment.
-
getEfficiencyModifier
public static int getEfficiencyModifier(EntityLivingBase player)
+ Return the extra efficiency of tools based on enchantments on equipped player item.
-
getSilkTouchModifier
public static boolean getSilkTouchModifier(EntityLivingBase player)
+ Returns the silk touch status of enchantments on current equipped item of player.
-
getFortuneModifier
public static int getFortuneModifier(EntityLivingBase player)
+ Returns the fortune enchantment modifier of the current equipped item of player.
-
getLuckOfSeaModifier
public static int getLuckOfSeaModifier(EntityLivingBase player)
+ Returns the level of the 'Luck Of The Sea' enchantment.
-
getLureModifier
public static int getLureModifier(EntityLivingBase player)
+ Returns the level of the 'Lure' enchantment on the players held item.
-
getLootingModifier
public static int getLootingModifier(EntityLivingBase player)
+ Returns the looting enchantment modifier of the current equipped item of player.
-
getAquaAffinityModifier
public static boolean getAquaAffinityModifier(EntityLivingBase player)
+ Returns the aqua affinity status of enchantments on current equipped item of player.
-
getEnchantedItem
public static ItemStack getEnchantedItem(Enchantment parEnchantment, EntityLivingBase parEntityLivingBase)
-
calcItemStackEnchantability
public static int calcItemStackEnchantability(EaglercraftRandom parRandom, int parInt1, int parInt2, ItemStack parItemStack)
+ 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(EaglercraftRandom parRandom, ItemStack parItemStack, int parInt1)
+ Adds a random enchantment to the specified item. Args: random, itemStack, enchantabilityLevel
-
buildEnchantmentList
public static java.util.List<EnchantmentData> buildEnchantmentList(EaglercraftRandom randomIn, ItemStack itemStackIn, int parInt1)
+ 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 java.util.Map<java.lang.Integer,EnchantmentData> mapEnchantmentData(int parInt1, ItemStack parItemStack)
-
-