net.minecraft.world.item.enchantment

public class EnchantmentHelper

bum
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_

Constructor summary

ModifierConstructor
public ()

Method summary

Modifier and TypeMethod
public static CompoundTag
a(ww 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(na 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(na arg0)
getEnchantmentLevel(CompoundTag arg0)
method_37424(class_2487 arg0)
getLevelFromNbt(NbtCompound nbt)
m_182438_(C_4917_ p_182439_)
public static ResourceLocation
b(na arg0)
getEnchantmentId(CompoundTag arg0)
method_37427(class_2487 arg0)
getIdFromNbt(NbtCompound nbt)
m_182446_(C_4917_ p_182447_)
public static ResourceLocation
a(buk arg0)
getEnchantmentId(Enchantment arg0)
method_37423(class_1887 arg0)
getEnchantmentId(Enchantment enchantment)
m_182432_(C_1505_ p_182433_)
public static int
a(buk arg0, bqq 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_)
getEnchantmentLevel(Enchantment arg0, ItemStack arg1)
public static Map<Enchantment, Integer>
a(bqq arg0)
getEnchantments(ItemStack arg0)
method_8222(class_1799 arg0)
get(ItemStack stack)
m_44831_(C_1391_ p_44832_)
public static Map<Enchantment, Integer>
a(ng arg0)
deserializeEnchantments(ListTag arg0)
method_22445(class_2499 arg0)
fromNbt(NbtList list)
m_44882_(C_4930_ p_44883_)
public static void
a(Map<buk, Integer> arg0, bqq 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(bum$a arg0, bqq 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(bum$a arg0, Iterable<bqq> 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<bqq> arg0, asq 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(bqq arg0, atz 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(atu arg0)
getSweepingDamageRatio(LivingEntity arg0)
method_8217(class_1309 arg0)
getSweepingMultiplier(LivingEntity entity)
m_44821_(C_524_ p_44822_)
public static void
a(atu arg0, atg 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(atu arg0, atg 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(buk arg0, atu 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 int
b(atu arg0)
getKnockbackBonus(LivingEntity arg0)
method_8205(class_1309 arg0)
getKnockback(LivingEntity entity)
m_44894_(C_524_ p_44895_)
public static int
c(atu arg0)
getFireAspect(LivingEntity arg0)
method_8199(class_1309 arg0)
getFireAspect(LivingEntity entity)
m_44914_(C_524_ p_44915_)
getFireAspectEnchantmentLevel(EntityLiving arg0)
public static int
d(atu arg0)
getRespiration(LivingEntity arg0)
method_8211(class_1309 arg0)
getRespiration(LivingEntity entity)
m_44918_(C_524_ p_44919_)
getOxygenEnchantmentLevel(EntityLiving arg0)
public static int
e(atu arg0)
getDepthStrider(LivingEntity arg0)
method_8232(class_1309 arg0)
getDepthStrider(LivingEntity entity)
m_44922_(C_524_ p_44923_)
public static int
f(atu arg0)
getBlockEfficiency(LivingEntity arg0)
method_8234(class_1309 arg0)
getEfficiency(LivingEntity entity)
m_44926_(C_524_ p_44927_)
getDigSpeedEnchantmentLevel(EntityLiving arg0)
public static int
b(bqq arg0)
getFishingLuckBonus(ItemStack arg0)
method_8223(class_1799 arg0)
getLuckOfTheSea(ItemStack stack)
m_44904_(C_1391_ p_44905_)
public static int
c(bqq arg0)
getFishingSpeedBonus(ItemStack arg0)
method_8215(class_1799 arg0)
getLure(ItemStack stack)
m_44916_(C_1391_ p_44917_)
public static int
g(atu arg0)
getMobLooting(LivingEntity arg0)
method_8226(class_1309 arg0)
getLooting(LivingEntity entity)
m_44930_(C_524_ p_44931_)
public static boolean
h(atu arg0)
hasAquaAffinity(LivingEntity arg0)
method_8200(class_1309 arg0)
hasAquaAffinity(LivingEntity entity)
m_44934_(C_524_ p_44935_)
public static boolean
i(atu arg0)
hasFrostWalker(LivingEntity arg0)
method_8216(class_1309 arg0)
hasFrostWalker(LivingEntity entity)
m_44938_(C_524_ p_44939_)
public static boolean
j(atu arg0)
hasSoulSpeed(LivingEntity arg0)
method_25951(class_1309 arg0)
hasSoulSpeed(LivingEntity entity)
m_44942_(C_524_ p_44943_)
public static boolean
d(bqq arg0)
hasBindingCurse(ItemStack arg0)
method_8224(class_1799 arg0)
hasBindingCurse(ItemStack stack)
m_44920_(C_1391_ p_44921_)
public static boolean
e(bqq arg0)
hasVanishingCurse(ItemStack arg0)
method_8221(class_1799 arg0)
hasVanishingCurse(ItemStack stack)
m_44924_(C_1391_ p_44925_)
shouldNotDrop(ItemStack arg0)
public static int
f(bqq arg0)
getLoyalty(ItemStack arg0)
method_8206(class_1799 arg0)
getLoyalty(ItemStack stack)
m_44928_(C_1391_ p_44929_)
public static int
g(bqq arg0)
getRiptide(ItemStack arg0)
method_8202(class_1799 arg0)
getRiptide(ItemStack stack)
m_44932_(C_1391_ p_44933_)
public static boolean
h(bqq 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(buk arg0, atu 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(buk arg0, atu arg1, Predicate<bqq> 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(Random arg0, int arg1, int arg2, bqq arg3)
getEnchantmentCost(Random arg0, int arg1, int arg2, ItemStack arg3)
method_8227(Random arg0, int arg1, int arg2, class_1799 arg3)
calculateRequiredExperienceLevel(Random random, int slotIndex, int bookshelfCount, ItemStack stack)
m_44872_(Random p_44873_, int p_44874_, int p_44875_, C_1391_ p_44876_)
public static ItemStack
a(Random arg0, bqq arg1, int arg2, boolean arg3)
enchantItem(Random arg0, ItemStack arg1, int arg2, boolean arg3)
method_8233(Random arg0, class_1799 arg1, int arg2, boolean arg3)
enchant(Random random, ItemStack target, int level, boolean treasureAllowed)
m_44877_(Random p_44878_, C_1391_ p_44879_, int p_44880_, boolean p_44881_)
public static List<EnchantmentInstance>
b(Random arg0, bqq arg1, int arg2, boolean arg3)
selectEnchantment(Random arg0, ItemStack arg1, int arg2, boolean arg3)
method_8230(Random arg0, class_1799 arg1, int arg2, boolean arg3)
generateEnchantments(Random random, ItemStack stack, int level, boolean treasureAllowed)
m_44909_(Random p_44910_, C_1391_ p_44911_, int p_44912_, boolean p_44913_)
public static void
a(List<bun> arg0, bun 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<buk> arg0, buk 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, bqq 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_)