public class EnchantmentHelper
extends java.lang.Object
Modifier and Type | Class and Description |
---|---|
(package private) static interface |
EnchantmentHelper.IEnchantmentVisitor |
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(LivingEntity user,
Entity target) |
private static void |
applyEnchantmentModifier(EnchantmentHelper.IEnchantmentVisitor modifier,
ItemStack stack) |
private static void |
applyEnchantmentModifierArray(EnchantmentHelper.IEnchantmentVisitor modifier,
java.lang.Iterable<ItemStack> stacks) |
static void |
applyThornEnchantments(LivingEntity user,
Entity attacker) |
static boolean |
areAllCompatibleWith(java.util.Collection<Enchantment> enchantmentsIn,
Enchantment enchantmentIn) |
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 java.util.Map<Enchantment,java.lang.Integer> |
func_226652_a_(ListNBT p_226652_0_) |
static int |
getDepthStriderModifier(LivingEntity entityIn) |
static int |
getEfficiencyModifier(LivingEntity entityIn) |
static java.util.List<EnchantmentData> |
getEnchantmentDatas(int p_185291_0_,
ItemStack stack,
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(LivingEntity player) |
static int |
getFishingLuckBonus(ItemStack stack) |
static int |
getFishingSpeedBonus(ItemStack stack) |
static int |
getKnockbackModifier(LivingEntity player) |
static int |
getLootingModifier(LivingEntity entityIn) |
static int |
getLoyaltyModifier(ItemStack stack) |
static int |
getMaxEnchantmentLevel(Enchantment enchantmentIn,
LivingEntity entityIn) |
static float |
getModifierForCreature(ItemStack stack,
CreatureAttribute creatureAttribute) |
static java.util.Map.Entry<EquipmentSlotType,ItemStack> |
getRandomItemWithEnchantment(Enchantment targetEnchantment,
LivingEntity entityIn) |
static int |
getRespirationModifier(LivingEntity entityIn) |
static int |
getRiptideModifier(ItemStack stack) |
static float |
getSweepingDamageRatio(LivingEntity entityIn) |
static boolean |
hasAquaAffinity(LivingEntity entityIn) |
static boolean |
hasBindingCurse(ItemStack stack) |
static boolean |
hasChanneling(ItemStack stack) |
static boolean |
hasFrostWalker(LivingEntity player) |
static boolean |
hasVanishingCurse(ItemStack stack) |
static void |
removeIncompatible(java.util.List<EnchantmentData> dataList,
EnchantmentData data) |
static void |
setEnchantments(java.util.Map<Enchantment,java.lang.Integer> enchMap,
ItemStack stack) |
public static int getEnchantmentLevel(Enchantment enchID, ItemStack stack)
public static java.util.Map<Enchantment,java.lang.Integer> getEnchantments(ItemStack stack)
public static java.util.Map<Enchantment,java.lang.Integer> func_226652_a_(ListNBT p_226652_0_)
public static void setEnchantments(java.util.Map<Enchantment,java.lang.Integer> enchMap, ItemStack stack)
private static void applyEnchantmentModifier(EnchantmentHelper.IEnchantmentVisitor modifier, ItemStack stack)
private static void applyEnchantmentModifierArray(EnchantmentHelper.IEnchantmentVisitor modifier, java.lang.Iterable<ItemStack> stacks)
public static int getEnchantmentModifierDamage(java.lang.Iterable<ItemStack> stacks, DamageSource source)
public static float getModifierForCreature(ItemStack stack, CreatureAttribute creatureAttribute)
public static float getSweepingDamageRatio(LivingEntity entityIn)
public static void applyThornEnchantments(LivingEntity user, Entity attacker)
public static void applyArthropodEnchantments(LivingEntity user, Entity target)
public static int getMaxEnchantmentLevel(Enchantment enchantmentIn, LivingEntity entityIn)
public static int getKnockbackModifier(LivingEntity player)
public static int getFireAspectModifier(LivingEntity player)
public static int getRespirationModifier(LivingEntity entityIn)
public static int getDepthStriderModifier(LivingEntity entityIn)
public static int getEfficiencyModifier(LivingEntity entityIn)
public static int getFishingLuckBonus(ItemStack stack)
public static int getFishingSpeedBonus(ItemStack stack)
public static int getLootingModifier(LivingEntity entityIn)
public static boolean hasAquaAffinity(LivingEntity entityIn)
public static boolean hasFrostWalker(LivingEntity player)
public static boolean hasBindingCurse(ItemStack stack)
public static boolean hasVanishingCurse(ItemStack stack)
public static int getLoyaltyModifier(ItemStack stack)
public static int getRiptideModifier(ItemStack stack)
public static boolean hasChanneling(ItemStack stack)
@Nullable public static java.util.Map.Entry<EquipmentSlotType,ItemStack> getRandomItemWithEnchantment(Enchantment targetEnchantment, LivingEntity entityIn)
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> dataList, EnchantmentData data)
public static boolean areAllCompatibleWith(java.util.Collection<Enchantment> enchantmentsIn, Enchantment enchantmentIn)
public static java.util.List<EnchantmentData> getEnchantmentDatas(int p_185291_0_, ItemStack stack, boolean allowTreasure)