net.minecraft.world.item.enchantment

public class EnchantmentHelper

cke
net.minecraft.world.item.enchantment.EnchantmentHelper
net.minecraft.class_1890
net.minecraft.enchantment.EnchantmentHelper
net.minecraft.src.C_1522_
net.minecraft.world.item.enchantment.EnchantmentManager

Field summary

Modifier and TypeField
private static final String
a
TAG_ENCH_ID
field_34025
ID_KEY
f_182430_
private static final String
b
TAG_ENCH_LEVEL
field_34026
LEVEL_KEY
f_182431_
private static final float
c
SWIFT_SNEAK_EXTRA_FACTOR
field_38222
field_38222
f_220286_

Constructor summary

ModifierConstructor
public ()

Method summary

Modifier and TypeMethod
public static CompoundTag
a(add arg0, int arg1)
storeEnchantment(ResourceLocation arg0, int arg1)
method_37426(class_2960 arg0, int arg1)
createNbt(Identifier id, int lvl)
m_182443_(C_5265_ p_182444_, int p_182445_)
public static void
a(re arg0, int arg1)
setEnchantmentLevel(CompoundTag arg0, int arg1)
method_37425(class_2487 arg0, int arg1)
writeLevelToNbt(NbtCompound nbt, int lvl)
m_182440_(C_4917_ p_182441_, int p_182442_)
public static int
a(re arg0)
getEnchantmentLevel(CompoundTag arg0)
method_37424(class_2487 arg0)
getLevelFromNbt(NbtCompound nbt)
m_182438_(C_4917_ p_182439_)
public static ResourceLocation
b(re arg0)
getEnchantmentId(CompoundTag arg0)
method_37427(class_2487 arg0)
getIdFromNbt(NbtCompound nbt)
m_182446_(C_4917_ p_182447_)
public static ResourceLocation
a(ckc arg0)
getEnchantmentId(Enchantment arg0)
method_37423(class_1887 arg0)
getEnchantmentId(Enchantment enchantment)
m_182432_(C_1505_ p_182433_)
public static int
a(ckc arg0, cfv arg1)
getItemEnchantmentLevel(Enchantment arg0, ItemStack arg1)
method_8225(class_1887 arg0, class_1799 arg1)
getLevel(Enchantment enchantment, ItemStack stack)
m_44843_(C_1505_ p_44844_, C_1391_ p_44845_)
public static Map<Enchantment, Integer>
a(cfv arg0)
getEnchantments(ItemStack arg0)
method_8222(class_1799 arg0)
get(ItemStack stack)
m_44831_(C_1391_ p_44832_)
public static Map<Enchantment, Integer>
a(rk arg0)
deserializeEnchantments(ListTag arg0)
method_22445(class_2499 arg0)
fromNbt(NbtList list)
m_44882_(C_4930_ p_44883_)
public static void
a(Map<ckc, Integer> arg0, cfv arg1)
setEnchantments(Map<Enchantment, Integer> arg0, ItemStack arg1)
method_8214(Map<class_1887, Integer> arg0, class_1799 arg1)
set(Map<Enchantment, Integer> enchantments, ItemStack stack)
m_44865_(Map<C_1505_, Integer> p_44866_, C_1391_ p_44867_)
private static void
a(cke$a arg0, cfv arg1)
runIterationOnItem(EnchantmentHelper$EnchantmentVisitor arg0, ItemStack arg1)
method_8220(class_1890$class_1891 arg0, class_1799 arg1)
forEachEnchantment(EnchantmentHelper$Consumer consumer, ItemStack stack)
m_44850_(C_1522_$C_1523_ p_44851_, C_1391_ p_44852_)
private static void
a(cke$a arg0, Iterable<cfv> arg1)
runIterationOnInventory(EnchantmentHelper$EnchantmentVisitor arg0, Iterable<ItemStack> arg1)
method_8209(class_1890$class_1891 arg0, Iterable<class_1799> arg1)
forEachEnchantment(EnchantmentHelper$Consumer consumer, Iterable<ItemStack> stacks)
m_44853_(C_1522_$C_1523_ p_44854_, Iterable<C_1391_> p_44855_)
public static int
a(Iterable<cfv> arg0, bem arg1)
getDamageProtection(Iterable<ItemStack> arg0, DamageSource arg1)
method_8219(Iterable<class_1799> arg0, class_1282 arg1)
getProtectionAmount(Iterable<ItemStack> equipment, DamageSource source)
m_44856_(Iterable<C_1391_> p_44857_, C_489_ p_44858_)
public static float
a(cfv arg0, bgc arg1)
getDamageBonus(ItemStack arg0, MobType arg1)
method_8218(class_1799 arg0, class_1310 arg1)
getAttackDamage(ItemStack stack, EntityGroup group)
m_44833_(C_1391_ p_44834_, C_530_ p_44835_)
public static float
a(bfx arg0)
getSweepingDamageRatio(LivingEntity arg0)
method_8217(class_1309 arg0)
getSweepingMultiplier(LivingEntity entity)
m_44821_(C_524_ p_44822_)
public static void
a(bfx arg0, bfh arg1)
doPostHurtEffects(LivingEntity arg0, Entity arg1)
method_8210(class_1309 arg0, class_1297 arg1)
onUserDamaged(LivingEntity user, Entity attacker)
m_44823_(C_524_ p_44824_, C_507_ p_44825_)
public static void
b(bfx arg0, bfh arg1)
doPostDamageEffects(LivingEntity arg0, Entity arg1)
method_8213(class_1309 arg0, class_1297 arg1)
onTargetDamaged(LivingEntity user, Entity target)
m_44896_(C_524_ p_44897_, C_507_ p_44898_)
public static int
a(ckc arg0, bfx arg1)
getEnchantmentLevel(Enchantment arg0, LivingEntity arg1)
method_8203(class_1887 arg0, class_1309 arg1)
getEquipmentLevel(Enchantment enchantment, LivingEntity entity)
m_44836_(C_1505_ p_44837_, C_524_ p_44838_)
public static float
b(bfx arg0)
getSneakingSpeedBonus(LivingEntity arg0)
method_42304(class_1309 arg0)
getSwiftSneakSpeedBoost(LivingEntity entity)
m_220302_(C_524_ p_220303_)
public static int
c(bfx arg0)
getKnockbackBonus(LivingEntity arg0)
method_8205(class_1309 arg0)
getKnockback(LivingEntity entity)
m_44894_(C_524_ p_44895_)
public static int
d(bfx arg0)
getFireAspect(LivingEntity arg0)
method_8199(class_1309 arg0)
getFireAspect(LivingEntity entity)
m_44914_(C_524_ p_44915_)
public static int
e(bfx arg0)
getRespiration(LivingEntity arg0)
method_8211(class_1309 arg0)
getRespiration(LivingEntity entity)
m_44918_(C_524_ p_44919_)
public static int
f(bfx arg0)
getDepthStrider(LivingEntity arg0)
method_8232(class_1309 arg0)
getDepthStrider(LivingEntity entity)
m_44922_(C_524_ p_44923_)
public static int
g(bfx arg0)
getBlockEfficiency(LivingEntity arg0)
method_8234(class_1309 arg0)
getEfficiency(LivingEntity entity)
m_44926_(C_524_ p_44927_)
public static int
b(cfv arg0)
getFishingLuckBonus(ItemStack arg0)
method_8223(class_1799 arg0)
getLuckOfTheSea(ItemStack stack)
m_44904_(C_1391_ p_44905_)
public static int
c(cfv arg0)
getFishingSpeedBonus(ItemStack arg0)
method_8215(class_1799 arg0)
getLure(ItemStack stack)
m_44916_(C_1391_ p_44917_)
public static int
h(bfx arg0)
getMobLooting(LivingEntity arg0)
method_8226(class_1309 arg0)
getLooting(LivingEntity entity)
m_44930_(C_524_ p_44931_)
public static boolean
i(bfx arg0)
hasAquaAffinity(LivingEntity arg0)
method_8200(class_1309 arg0)
hasAquaAffinity(LivingEntity entity)
m_44934_(C_524_ p_44935_)
public static boolean
j(bfx arg0)
hasFrostWalker(LivingEntity arg0)
method_8216(class_1309 arg0)
hasFrostWalker(LivingEntity entity)
m_44938_(C_524_ p_44939_)
public static boolean
k(bfx arg0)
hasSoulSpeed(LivingEntity arg0)
method_25951(class_1309 arg0)
hasSoulSpeed(LivingEntity entity)
m_44942_(C_524_ p_44943_)
public static boolean
d(cfv arg0)
hasBindingCurse(ItemStack arg0)
method_8224(class_1799 arg0)
hasBindingCurse(ItemStack stack)
m_44920_(C_1391_ p_44921_)
public static boolean
e(cfv arg0)
hasVanishingCurse(ItemStack arg0)
method_8221(class_1799 arg0)
hasVanishingCurse(ItemStack stack)
m_44924_(C_1391_ p_44925_)
public static boolean
f(cfv arg0)
hasSilkTouch(ItemStack arg0)
method_49189(class_1799 arg0)
hasSilkTouch(ItemStack stack)
m_272262_(C_1391_ p_273444_)
public static int
g(cfv arg0)
getLoyalty(ItemStack arg0)
method_8206(class_1799 arg0)
getLoyalty(ItemStack stack)
m_44928_(C_1391_ p_44929_)
public static int
h(cfv arg0)
getRiptide(ItemStack arg0)
method_8202(class_1799 arg0)
getRiptide(ItemStack stack)
m_44932_(C_1391_ p_44933_)
public static boolean
i(cfv arg0)
hasChanneling(ItemStack arg0)
method_8228(class_1799 arg0)
hasChanneling(ItemStack stack)
m_44936_(C_1391_ p_44937_)
public static Map$Entry<EquipmentSlot, ItemStack>
b(ckc arg0, bfx arg1)
getRandomItemWith(Enchantment arg0, LivingEntity arg1)
method_8204(class_1887 arg0, class_1309 arg1)
chooseEquipmentWith(Enchantment enchantment, LivingEntity entity)
m_44906_(C_1505_ p_44907_, C_524_ p_44908_)
public static Map$Entry<EquipmentSlot, ItemStack>
a(ckc arg0, bfx arg1, Predicate<cfv> arg2)
getRandomItemWith(Enchantment arg0, LivingEntity arg1, Predicate<ItemStack> arg2)
method_24365(class_1887 arg0, class_1309 arg1, Predicate<class_1799> arg2)
chooseEquipmentWith(Enchantment enchantment, LivingEntity entity, Predicate<ItemStack> condition)
m_44839_(C_1505_ p_44840_, C_524_ p_44841_, Predicate<C_1391_> p_44842_)
public static int
a(apo arg0, int arg1, int arg2, cfv arg3)
getEnchantmentCost(RandomSource arg0, int arg1, int arg2, ItemStack arg3)
method_8227(class_5819 arg0, int arg1, int arg2, class_1799 arg3)
calculateRequiredExperienceLevel(Random random, int slotIndex, int bookshelfCount, ItemStack stack)
m_220287_(C_212974_ p_220288_, int p_220289_, int p_220290_, C_1391_ p_220291_)
public static ItemStack
a(apo arg0, cfv arg1, int arg2, boolean arg3)
enchantItem(RandomSource arg0, ItemStack arg1, int arg2, boolean arg3)
method_8233(class_5819 arg0, class_1799 arg1, int arg2, boolean arg3)
enchant(Random random, ItemStack target, int level, boolean treasureAllowed)
m_220292_(C_212974_ p_220293_, C_1391_ p_220294_, int p_220295_, boolean p_220296_)
public static List<EnchantmentInstance>
b(apo arg0, cfv arg1, int arg2, boolean arg3)
selectEnchantment(RandomSource arg0, ItemStack arg1, int arg2, boolean arg3)
method_8230(class_5819 arg0, class_1799 arg1, int arg2, boolean arg3)
generateEnchantments(Random random, ItemStack stack, int level, boolean treasureAllowed)
m_220297_(C_212974_ p_220298_, C_1391_ p_220299_, int p_220300_, boolean p_220301_)
public static void
a(List<ckf> arg0, ckf arg1)
filterCompatibleEnchantments(List<EnchantmentInstance> arg0, EnchantmentInstance arg1)
method_8231(List<class_1889> arg0, class_1889 arg1)
removeConflicts(List<EnchantmentLevelEntry> possibleEntries, EnchantmentLevelEntry pickedEntry)
m_44862_(List<C_1524_> p_44863_, C_1524_ p_44864_)
public static boolean
a(Collection<ckc> arg0, ckc arg1)
isEnchantmentCompatible(Collection<Enchantment> arg0, Enchantment arg1)
method_8201(Collection<class_1887> arg0, class_1887 arg1)
isCompatible(Collection<Enchantment> existing, Enchantment candidate)
m_44859_(Collection<C_1505_> p_44860_, C_1505_ p_44861_)
public static List<EnchantmentInstance>
a(int arg0, cfv arg1, boolean arg2)
getAvailableEnchantmentResults(int arg0, ItemStack arg1, boolean arg2)
method_8229(int arg0, class_1799 arg1, boolean arg2)
getPossibleEntries(int power, ItemStack stack, boolean treasureAllowed)
m_44817_(int p_44818_, C_1391_ p_44819_, boolean p_44820_)