Package net.minecraft.enchantment
Class EnchantmentHelper
java.lang.Object
net.minecraft.enchantment.EnchantmentHelper
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescription(package private) static interface -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic Map<Enchantment,Integer> deserializeEnchantments(ListNBT p_226652_0_) static voiddoPostDamageEffects(LivingEntity p_151385_0_, Entity p_151385_1_) static voiddoPostHurtEffects(LivingEntity p_151384_0_, Entity p_151384_1_) static ItemStackenchantItem(Random p_77504_0_, ItemStack p_77504_1_, int p_77504_2_, boolean p_77504_3_) static voidfilterCompatibleEnchantments(List<EnchantmentData> p_185282_0_, EnchantmentData p_185282_1_) static List<EnchantmentData>getAvailableEnchantmentResults(int p_185291_0_, ItemStack p_185291_1_, boolean p_185291_2_) static intgetBlockEfficiency(LivingEntity p_185293_0_) static floatgetDamageBonus(ItemStack p_152377_0_, CreatureAttribute p_152377_1_) static intgetDamageProtection(Iterable<ItemStack> p_77508_0_, DamageSource p_77508_1_) static intgetDepthStrider(LivingEntity p_185294_0_) static intgetEnchantmentCost(Random p_77514_0_, int p_77514_1_, int p_77514_2_, ItemStack p_77514_3_) static intgetEnchantmentLevel(Enchantment p_185284_0_, LivingEntity p_185284_1_) static Map<Enchantment,Integer> getEnchantments(ItemStack p_82781_0_) static intgetFireAspect(LivingEntity p_90036_0_) static intgetFishingLuckBonus(ItemStack p_191529_0_) static intgetFishingSpeedBonus(ItemStack p_191528_0_) static intgetItemEnchantmentLevel(Enchantment p_77506_0_, ItemStack p_77506_1_) static intgetKnockbackBonus(LivingEntity p_77501_0_) static intgetLoyalty(ItemStack p_203191_0_) static intgetMobLooting(LivingEntity p_185283_0_) static Map.Entry<EquipmentSlotType,ItemStack> getRandomItemWith(Enchantment p_222189_0_, LivingEntity p_222189_1_) static Map.Entry<EquipmentSlotType,ItemStack> getRandomItemWith(Enchantment p_234844_0_, LivingEntity p_234844_1_, Predicate<ItemStack> p_234844_2_) static intgetRespiration(LivingEntity p_185292_0_) static intgetRiptide(ItemStack p_203190_0_) static floatgetSweepingDamageRatio(LivingEntity p_191527_0_) static booleanhasAquaAffinity(LivingEntity p_185287_0_) static booleanhasBindingCurse(ItemStack p_190938_0_) static booleanhasChanneling(ItemStack p_203192_0_) static booleanhasFrostWalker(LivingEntity p_189869_0_) static booleanhasSoulSpeed(LivingEntity p_234846_0_) static booleanhasVanishingCurse(ItemStack p_190939_0_) static booleanisEnchantmentCompatible(Collection<Enchantment> p_201840_0_, Enchantment p_201840_1_) private static voidrunIterationOnInventory(EnchantmentHelper.IEnchantmentVisitor p_77516_0_, Iterable<ItemStack> p_77516_1_) private static voidrunIterationOnItem(EnchantmentHelper.IEnchantmentVisitor p_77518_0_, ItemStack p_77518_1_) static List<EnchantmentData>selectEnchantment(Random p_77513_0_, ItemStack p_77513_1_, int p_77513_2_, boolean p_77513_3_) static voidsetEnchantments(Map<Enchantment, Integer> p_82782_0_, ItemStack p_82782_1_)
-
Constructor Details
-
EnchantmentHelper
public EnchantmentHelper()
-
-
Method Details
-
getItemEnchantmentLevel
-
getEnchantments
-
deserializeEnchantments
-
setEnchantments
-
runIterationOnItem
private static void runIterationOnItem(EnchantmentHelper.IEnchantmentVisitor p_77518_0_, ItemStack p_77518_1_) -
runIterationOnInventory
private static void runIterationOnInventory(EnchantmentHelper.IEnchantmentVisitor p_77516_0_, Iterable<ItemStack> p_77516_1_) -
getDamageProtection
-
getDamageBonus
-
getSweepingDamageRatio
-
doPostHurtEffects
-
doPostDamageEffects
-
getEnchantmentLevel
-
getKnockbackBonus
-
getFireAspect
-
getRespiration
-
getDepthStrider
-
getBlockEfficiency
-
getFishingLuckBonus
-
getFishingSpeedBonus
-
getMobLooting
-
hasAquaAffinity
-
hasFrostWalker
-
hasSoulSpeed
-
hasBindingCurse
-
hasVanishingCurse
-
getLoyalty
-
getRiptide
-
hasChanneling
-
getRandomItemWith
@Nullable public static Map.Entry<EquipmentSlotType,ItemStack> getRandomItemWith(Enchantment p_222189_0_, LivingEntity p_222189_1_) -
getRandomItemWith
@Nullable public static Map.Entry<EquipmentSlotType,ItemStack> getRandomItemWith(Enchantment p_234844_0_, LivingEntity p_234844_1_, Predicate<ItemStack> p_234844_2_) -
getEnchantmentCost
-
enchantItem
-
selectEnchantment
public static List<EnchantmentData> selectEnchantment(Random p_77513_0_, ItemStack p_77513_1_, int p_77513_2_, boolean p_77513_3_) -
filterCompatibleEnchantments
public static void filterCompatibleEnchantments(List<EnchantmentData> p_185282_0_, EnchantmentData p_185282_1_) -
isEnchantmentCompatible
public static boolean isEnchantmentCompatible(Collection<Enchantment> p_201840_0_, Enchantment p_201840_1_) -
getAvailableEnchantmentResults
public static List<EnchantmentData> getAvailableEnchantmentResults(int p_185291_0_, ItemStack p_185291_1_, boolean p_185291_2_)
-