public class EnchantmentHelper
extends java.lang.Object
Modifier and Type | Class and Description |
---|---|
(package private) static class |
EnchantmentHelper.DamageIterator |
(package private) static class |
EnchantmentHelper.HurtIterator |
(package private) static interface |
EnchantmentHelper.IModifier |
(package private) static class |
EnchantmentHelper.ModifierDamage |
(package private) static class |
EnchantmentHelper.ModifierLiving |
Modifier and Type | Field and Description |
---|---|
private static EnchantmentHelper.DamageIterator |
ENCHANTMENT_ITERATOR_DAMAGE |
private static EnchantmentHelper.HurtIterator |
ENCHANTMENT_ITERATOR_HURT |
private static EnchantmentHelper.ModifierDamage |
ENCHANTMENT_MODIFIER_DAMAGE |
private static EnchantmentHelper.ModifierLiving |
ENCHANTMENT_MODIFIER_LIVING |
Constructor and Description |
---|
EnchantmentHelper() |
Modifier and Type | Method and Description |
---|---|
static ItemStack |
addRandomEnchantment(java.util.Random random,
ItemStack stack,
int level,
boolean allowTreasure) |
static void |
applyArthropodEnchantments(EntityLivingBase p_151385_0_,
Entity p_151385_1_) |
private static void |
applyEnchantmentModifier(EnchantmentHelper.IModifier modifier,
ItemStack stack) |
private static void |
applyEnchantmentModifierArray(EnchantmentHelper.IModifier modifier,
java.lang.Iterable<ItemStack> stacks) |
static void |
applyThornEnchantments(EntityLivingBase p_151384_0_,
Entity p_151384_1_) |
static java.util.List<EnchantmentData> |
buildEnchantmentList(java.util.Random randomIn,
ItemStack itemStackIn,
int level,
boolean allowTreasure) |
static int |
calcItemStackEnchantability(java.util.Random rand,
int enchantNum,
int power,
ItemStack stack) |
static boolean |
getAquaAffinityModifier(EntityLivingBase p_185287_0_) |
static int |
getDepthStriderModifier(EntityLivingBase p_185294_0_) |
static int |
getEfficiencyModifier(EntityLivingBase p_185293_0_) |
static ItemStack |
getEnchantedItem(Enchantment p_92099_0_,
EntityLivingBase p_92099_1_) |
static java.util.List<EnchantmentData> |
getEnchantmentDatas(int p_185291_0_,
ItemStack p_185291_1_,
boolean allowTreasure) |
static int |
getEnchantmentLevel(Enchantment enchID,
ItemStack stack) |
static int |
getEnchantmentModifierDamage(java.lang.Iterable<ItemStack> stacks,
DamageSource source) |
static java.util.Map<Enchantment,java.lang.Integer> |
getEnchantments(ItemStack stack) |
static int |
getFireAspectModifier(EntityLivingBase player) |
static int |
getFishingLuckBonus(ItemStack p_191529_0_) |
static int |
getFishingSpeedBonus(ItemStack p_191528_0_) |
static int |
getKnockbackModifier(EntityLivingBase player) |
static int |
getLootingModifier(EntityLivingBase p_185283_0_) |
static int |
getMaxEnchantmentLevel(Enchantment p_185284_0_,
EntityLivingBase p_185284_1_) |
static float |
getModifierForCreature(ItemStack stack,
EnumCreatureAttribute creatureAttribute) |
static int |
getRespirationModifier(EntityLivingBase p_185292_0_) |
static float |
getSweepingDamageRatio(EntityLivingBase p_191527_0_) |
static boolean |
hasBindingCurse(ItemStack p_190938_0_) |
static boolean |
hasFrostWalkerEnchantment(EntityLivingBase player) |
static boolean |
hasVanishingCurse(ItemStack p_190939_0_) |
static void |
removeIncompatible(java.util.List<EnchantmentData> p_185282_0_,
EnchantmentData p_185282_1_) |
static void |
setEnchantments(java.util.Map<Enchantment,java.lang.Integer> enchMap,
ItemStack stack) |
private static final EnchantmentHelper.ModifierDamage ENCHANTMENT_MODIFIER_DAMAGE
private static final EnchantmentHelper.ModifierLiving ENCHANTMENT_MODIFIER_LIVING
private static final EnchantmentHelper.HurtIterator ENCHANTMENT_ITERATOR_HURT
private static final EnchantmentHelper.DamageIterator ENCHANTMENT_ITERATOR_DAMAGE
public static int getEnchantmentLevel(Enchantment enchID, ItemStack stack)
public static java.util.Map<Enchantment,java.lang.Integer> getEnchantments(ItemStack stack)
public static void setEnchantments(java.util.Map<Enchantment,java.lang.Integer> enchMap, ItemStack stack)
private static void applyEnchantmentModifier(EnchantmentHelper.IModifier modifier, ItemStack stack)
private static void applyEnchantmentModifierArray(EnchantmentHelper.IModifier modifier, java.lang.Iterable<ItemStack> stacks)
public static int getEnchantmentModifierDamage(java.lang.Iterable<ItemStack> stacks, DamageSource source)
public static float getModifierForCreature(ItemStack stack, EnumCreatureAttribute creatureAttribute)
public static float getSweepingDamageRatio(EntityLivingBase p_191527_0_)
public static void applyThornEnchantments(EntityLivingBase p_151384_0_, Entity p_151384_1_)
public static void applyArthropodEnchantments(EntityLivingBase p_151385_0_, Entity p_151385_1_)
public static int getMaxEnchantmentLevel(Enchantment p_185284_0_, EntityLivingBase p_185284_1_)
public static int getKnockbackModifier(EntityLivingBase player)
public static int getFireAspectModifier(EntityLivingBase player)
public static int getRespirationModifier(EntityLivingBase p_185292_0_)
public static int getDepthStriderModifier(EntityLivingBase p_185294_0_)
public static int getEfficiencyModifier(EntityLivingBase p_185293_0_)
public static int getFishingLuckBonus(ItemStack p_191529_0_)
public static int getFishingSpeedBonus(ItemStack p_191528_0_)
public static int getLootingModifier(EntityLivingBase p_185283_0_)
public static boolean getAquaAffinityModifier(EntityLivingBase p_185287_0_)
public static boolean hasFrostWalkerEnchantment(EntityLivingBase player)
public static boolean hasBindingCurse(ItemStack p_190938_0_)
public static boolean hasVanishingCurse(ItemStack p_190939_0_)
public static ItemStack getEnchantedItem(Enchantment p_92099_0_, EntityLivingBase p_92099_1_)
public static int calcItemStackEnchantability(java.util.Random rand, int enchantNum, int power, ItemStack stack)
public static ItemStack addRandomEnchantment(java.util.Random random, ItemStack stack, int level, boolean allowTreasure)
public static java.util.List<EnchantmentData> buildEnchantmentList(java.util.Random randomIn, ItemStack itemStackIn, int level, boolean allowTreasure)
public static void removeIncompatible(java.util.List<EnchantmentData> p_185282_0_, EnchantmentData p_185282_1_)
public static java.util.List<EnchantmentData> getEnchantmentDatas(int p_185291_0_, ItemStack p_185291_1_, boolean allowTreasure)