net.minecraft.world.item.enchantment

public class EnchantmentHelper

deb
net.minecraft.world.item.enchantment.EnchantmentHelper
net.minecraft.class_1890
net.minecraft.enchantment.EnchantmentHelper
net.minecraft.world.item.enchantment.EnchantmentManager

Constructor summary

ModifierConstructor
public ()

Method summary

Modifier and TypeMethod
public static int
a(jq<ddz> arg0, cxp arg1)
getItemEnchantmentLevel(Holder<Enchantment> arg0, ItemStack arg1)
method_8225(class_6880<class_1887> arg0, class_1799 arg1)
getLevel(RegistryEntry<Enchantment> enchantment, ItemStack stack)
public static ItemEnchantments
a(cxp arg0, Consumer<def$a> arg1)
updateEnchantments(ItemStack arg0, Consumer<ItemEnchantments$Mutable> arg1)
method_57531(class_1799 arg0, Consumer<class_9304$class_9305> arg1)
apply(ItemStack stack, Consumer<ItemEnchantmentsComponent$Builder> applier)
public static boolean
a(cxp arg0)
canStoreEnchantments(ItemStack arg0)
method_57529(class_1799 arg0)
canHaveEnchantments(ItemStack stack)
public static void
a(cxp arg0, def arg1)
setEnchantments(ItemStack arg0, ItemEnchantments arg1)
method_57530(class_1799 arg0, class_9304 arg1)
set(ItemStack stack, ItemEnchantmentsComponent enchantments)
public static ItemEnchantments
b(cxp arg0)
getEnchantmentsForCrafting(ItemStack arg0)
method_57532(class_1799 arg0)
getEnchantments(ItemStack stack)
private static DataComponentType<ItemEnchantments>
d(cxp arg0)
getComponentType(ItemStack arg0)
method_57533(class_1799 arg0)
getEnchantmentsComponentType(ItemStack stack)
public static boolean
c(cxp arg0)
hasAnyEnchantments(ItemStack arg0)
method_58117(class_1799 arg0)
hasEnchantments(ItemStack stack)
public static int
a(ash arg0, cxp arg1, int arg2)
processDurabilityChange(ServerLevel arg0, ItemStack arg1, int arg2)
method_60117(class_3218 arg0, class_1799 arg1, int arg2)
getItemDamage(ServerWorld world, ItemStack stack, int baseItemDamage)
public static int
a(ash arg0, cxp arg1, cxp arg2, int arg3)
processAmmoUse(ServerLevel arg0, ItemStack arg1, ItemStack arg2, int arg3)
method_60129(class_3218 arg0, class_1799 arg1, class_1799 arg2, int arg3)
getAmmoUse(ServerWorld world, ItemStack rangedWeaponStack, ItemStack projectileStack, int baseAmmoUse)
public static int
b(ash arg0, cxp arg1, int arg2)
processBlockExperience(ServerLevel arg0, ItemStack arg1, int arg2)
method_60157(class_3218 arg0, class_1799 arg1, int arg2)
getBlockExperience(ServerWorld world, ItemStack stack, int baseBlockExperience)
public static int
a(ash arg0, bvk arg1, bvk arg2, int arg3)
processMobExperience(ServerLevel arg0, Entity arg1, Entity arg2, int arg3)
method_60109(class_3218 arg0, class_1297 arg1, class_1297 arg2, int arg3)
getMobExperience(ServerWorld world, Entity attacker, Entity mob, int baseMobExperience)
public static ItemStack
a(dec arg0)
createBook(EnchantmentInstance arg0)
method_61711(class_1889 arg0)
getEnchantedBookWith(EnchantmentLevelEntry entry)
private static void
a(cxp arg0, deb$b arg1)
runIterationOnItem(ItemStack arg0, EnchantmentHelper$EnchantmentVisitor arg1)
method_8220(class_1799 arg0, class_1890$class_1891 arg1)
forEachEnchantment(ItemStack stack, EnchantmentHelper$Consumer consumer)
private static void
a(cxp arg0, bvs arg1, bwg arg2, deb$a arg3)
runIterationOnItem(ItemStack arg0, EquipmentSlot arg1, LivingEntity arg2, EnchantmentHelper$EnchantmentInSlotVisitor arg3)
method_60139(class_1799 arg0, class_1304 arg1, class_1309 arg2, class_1890$class_9702 arg3)
forEachEnchantment(ItemStack stack, EquipmentSlot slot, LivingEntity entity, EnchantmentHelper$ContextAwareConsumer contextAwareConsumer)
private static void
a(bwg arg0, deb$a arg1)
runIterationOnEquipment(LivingEntity arg0, EnchantmentHelper$EnchantmentInSlotVisitor arg1)
method_8209(class_1309 arg0, class_1890$class_9702 arg1)
forEachEnchantment(LivingEntity entity, EnchantmentHelper$ContextAwareConsumer contextAwareConsumer)
public static boolean
a(ash arg0, bwg arg1, bua arg2)
isImmuneToDamage(ServerLevel arg0, LivingEntity arg1, DamageSource arg2)
method_60112(class_3218 arg0, class_1309 arg1, class_1282 arg2)
isInvulnerableTo(ServerWorld world, LivingEntity user, DamageSource damageSource)
public static float
b(ash arg0, bwg arg1, bua arg2)
getDamageProtection(ServerLevel arg0, LivingEntity arg1, DamageSource arg2)
method_8219(class_3218 arg0, class_1309 arg1, class_1282 arg2)
getProtectionAmount(ServerWorld world, LivingEntity user, DamageSource damageSource)
public static float
a(ash arg0, cxp arg1, bvk arg2, bua arg3, float arg4)
modifyDamage(ServerLevel arg0, ItemStack arg1, Entity arg2, DamageSource arg3, float arg4)
method_60120(class_3218 arg0, class_1799 arg1, class_1297 arg2, class_1282 arg3, float arg4)
getDamage(ServerWorld world, ItemStack stack, Entity target, DamageSource damageSource, float baseDamage)
public static float
b(ash arg0, cxp arg1, bvk arg2, bua arg3, float arg4)
modifyFallBasedDamage(ServerLevel arg0, ItemStack arg1, Entity arg2, DamageSource arg3, float arg4)
method_60160(class_3218 arg0, class_1799 arg1, class_1297 arg2, class_1282 arg3, float arg4)
getSmashDamagePerFallenBlock(ServerWorld world, ItemStack stack, Entity target, DamageSource damageSource, float baseSmashDamagePerFallenBlock)
public static float
c(ash arg0, cxp arg1, bvk arg2, bua arg3, float arg4)
modifyArmorEffectiveness(ServerLevel arg0, ItemStack arg1, Entity arg2, DamageSource arg3, float arg4)
method_60170(class_3218 arg0, class_1799 arg1, class_1297 arg2, class_1282 arg3, float arg4)
getArmorEffectiveness(ServerWorld world, ItemStack stack, Entity user, DamageSource damageSource, float baseArmorEffectiveness)
public static float
d(ash arg0, cxp arg1, bvk arg2, bua arg3, float arg4)
modifyKnockback(ServerLevel arg0, ItemStack arg1, Entity arg2, DamageSource arg3, float arg4)
method_60175(class_3218 arg0, class_1799 arg1, class_1297 arg2, class_1282 arg3, float arg4)
modifyKnockback(ServerWorld world, ItemStack stack, Entity target, DamageSource damageSource, float baseKnockback)
public static void
a(ash arg0, bvk arg1, bua arg2)
doPostAttackEffects(ServerLevel arg0, Entity arg1, DamageSource arg2)
method_60107(class_3218 arg0, class_1297 arg1, class_1282 arg2)
onTargetDamaged(ServerWorld world, Entity target, DamageSource damageSource)
public static void
a(ash arg0, bvk arg1, bua arg2, cxp arg3)
doPostAttackEffectsWithItemSource(ServerLevel arg0, Entity arg1, DamageSource arg2, ItemStack arg3)
method_60619(class_3218 arg0, class_1297 arg1, class_1282 arg2, class_1799 arg3)
onTargetDamaged(ServerWorld world, Entity target, DamageSource damageSource, ItemStack weapon)
public static void
a(ash arg0, bvk arg1, bua arg2, cxp arg3, Consumer<cxl> arg4)
doPostAttackEffectsWithItemSourceOnBreak(ServerLevel arg0, Entity arg1, DamageSource arg2, ItemStack arg3, Consumer<Item> arg4)
method_63016(class_3218 arg0, class_1297 arg1, class_1282 arg2, class_1799 arg3, Consumer<class_1792> arg4)
onTargetDamaged(ServerWorld world, Entity target, DamageSource damageSource, ItemStack weapon, Consumer<Item> breakCallback)
public static void
a(ash arg0, bwg arg1)
runLocationChangedEffects(ServerLevel arg0, LivingEntity arg1)
method_60111(class_3218 arg0, class_1309 arg1)
applyLocationBasedEffects(ServerWorld world, LivingEntity user)
public static void
a(ash arg0, cxp arg1, bwg arg2, bvs arg3)
runLocationChangedEffects(ServerLevel arg0, ItemStack arg1, LivingEntity arg2, EquipmentSlot arg3)
method_60125(class_3218 arg0, class_1799 arg1, class_1309 arg2, class_1304 arg3)
applyLocationBasedEffects(ServerWorld world, ItemStack stack, LivingEntity user, EquipmentSlot slot)
public static void
a(bwg arg0)
stopLocationBasedEffects(LivingEntity arg0)
method_60135(class_1309 arg0)
removeLocationBasedEffects(LivingEntity user)
public static void
a(cxp arg0, bwg arg1, bvs arg2)
stopLocationBasedEffects(ItemStack arg0, LivingEntity arg1, EquipmentSlot arg2)
method_60141(class_1799 arg0, class_1309 arg1, class_1304 arg2)
removeLocationBasedEffects(ItemStack stack, LivingEntity user, EquipmentSlot slot)
public static void
b(ash arg0, bwg arg1)
tickEffects(ServerLevel arg0, LivingEntity arg1)
method_60154(class_3218 arg0, class_1309 arg1)
onTick(ServerWorld world, LivingEntity user)
public static int
a(jq<ddz> arg0, bwg arg1)
getEnchantmentLevel(Holder<Enchantment> arg0, LivingEntity arg1)
method_8203(class_6880<class_1887> arg0, class_1309 arg1)
getEquipmentLevel(RegistryEntry<Enchantment> enchantment, LivingEntity entity)
public static int
a(ash arg0, cxp arg1, bvk arg2, int arg3)
processProjectileCount(ServerLevel arg0, ItemStack arg1, Entity arg2, int arg3)
method_60119(class_3218 arg0, class_1799 arg1, class_1297 arg2, int arg3)
getProjectileCount(ServerWorld world, ItemStack stack, Entity user, int baseProjectileCount)
public static float
a(ash arg0, cxp arg1, bvk arg2, float arg3)
processProjectileSpread(ServerLevel arg0, ItemStack arg1, Entity arg2, float arg3)
method_60118(class_3218 arg0, class_1799 arg1, class_1297 arg2, float arg3)
getProjectileSpread(ServerWorld world, ItemStack stack, Entity user, float baseProjectileSpread)
public static int
a(ash arg0, cxp arg1, cxp arg2)
getPiercingCount(ServerLevel arg0, ItemStack arg1, ItemStack arg2)
method_60128(class_3218 arg0, class_1799 arg1, class_1799 arg2)
getProjectilePiercing(ServerWorld world, ItemStack weaponStack, ItemStack projectileStack)
public static void
a(ash arg0, cxp arg1, cqq arg2, Consumer<cxl> arg3)
onProjectileSpawned(ServerLevel arg0, ItemStack arg1, Projectile arg2, Consumer<Item> arg3)
method_60127(class_3218 arg0, class_1799 arg1, class_1676 arg2, Consumer<class_1792> arg3)
onProjectileSpawned(ServerWorld world, ItemStack weaponStack, ProjectileEntity projectile, Consumer<Item> onBreak)
public static void
a(ash arg0, cxp arg1, bwg arg2, bvk arg3, bvs arg4, fby arg5, dxv arg6, Consumer<cxl> arg7)
onHitBlock(ServerLevel arg0, ItemStack arg1, LivingEntity arg2, Entity arg3, EquipmentSlot arg4, Vec3 arg5, BlockState arg6, Consumer<Item> arg7)
method_60124(class_3218 arg0, class_1799 arg1, class_1309 arg2, class_1297 arg3, class_1304 arg4, class_243 arg5, class_2680 arg6, Consumer<class_1792> arg7)
onHitBlock(ServerWorld world, ItemStack stack, LivingEntity user, Entity enchantedEntity, EquipmentSlot slot, Vec3d pos, BlockState state, Consumer<Item> onBreak)
public static int
c(ash arg0, cxp arg1, int arg2)
modifyDurabilityToRepairFromXp(ServerLevel arg0, ItemStack arg1, int arg2)
method_60168(class_3218 arg0, class_1799 arg1, int arg2)
getRepairWithXp(ServerWorld world, ItemStack stack, int baseRepairWithXp)
public static float
a(ash arg0, bwg arg1, bua arg2, float arg3)
processEquipmentDropChance(ServerLevel arg0, LivingEntity arg1, DamageSource arg2, float arg3)
method_60113(class_3218 arg0, class_1309 arg1, class_1282 arg2, float arg3)
getEquipmentDropChance(ServerWorld world, LivingEntity attacker, DamageSource damageSource, float baseEquipmentDropChance)
public static void
a(cxp arg0, bvt arg1, BiConsumer<jq<bxj>, bxm> arg2)
forEachModifier(ItemStack arg0, EquipmentSlotGroup arg1, BiConsumer<Holder<Attribute>, AttributeModifier> arg2)
method_60622(class_1799 arg0, class_9274 arg1, BiConsumer<class_6880<class_1320>, class_1322> arg2)
applyAttributeModifiers(ItemStack stack, AttributeModifierSlot slot, BiConsumer<RegistryEntry<EntityAttribute>, EntityAttributeModifier> attributeModifierConsumer)
public static void
a(cxp arg0, bvs arg1, BiConsumer<jq<bxj>, bxm> arg2)
forEachModifier(ItemStack arg0, EquipmentSlot arg1, BiConsumer<Holder<Attribute>, AttributeModifier> arg2)
method_60140(class_1799 arg0, class_1304 arg1, BiConsumer<class_6880<class_1320>, class_1322> arg2)
applyAttributeModifiers(ItemStack stack, EquipmentSlot slot, BiConsumer<RegistryEntry<EntityAttribute>, EntityAttributeModifier> attributeModifierConsumer)
public static int
a(ash arg0, cxp arg1, bvk arg2)
getFishingLuckBonus(ServerLevel arg0, ItemStack arg1, Entity arg2)
method_8223(class_3218 arg0, class_1799 arg1, class_1297 arg2)
getFishingLuckBonus(ServerWorld world, ItemStack stack, Entity user)
public static float
b(ash arg0, cxp arg1, bvk arg2)
getFishingTimeReduction(ServerLevel arg0, ItemStack arg1, Entity arg2)
method_60158(class_3218 arg0, class_1799 arg1, class_1297 arg2)
getFishingTimeReduction(ServerWorld world, ItemStack stack, Entity user)
public static int
c(ash arg0, cxp arg1, bvk arg2)
getTridentReturnToOwnerAcceleration(ServerLevel arg0, ItemStack arg1, Entity arg2)
method_60169(class_3218 arg0, class_1799 arg1, class_1297 arg2)
getTridentReturnAcceleration(ServerWorld world, ItemStack stack, Entity user)
public static float
a(cxp arg0, bwg arg1, float arg2)
modifyCrossbowChargingTime(ItemStack arg0, LivingEntity arg1, float arg2)
method_60159(class_1799 arg0, class_1309 arg1, float arg2)
getCrossbowChargeTime(ItemStack stack, LivingEntity user, float baseCrossbowChargeTime)
public static float
a(cxp arg0, bwg arg1)
getTridentSpinAttackStrength(ItemStack arg0, LivingEntity arg1)
method_60123(class_1799 arg0, class_1309 arg1)
getTridentSpinAttackStrength(ItemStack stack, LivingEntity user)
public static boolean
a(cxp arg0, ayk<ddz> arg1)
hasTag(ItemStack arg0, TagKey<Enchantment> arg1)
method_60138(class_1799 arg0, class_6862<class_1887> arg1)
hasAnyEnchantmentsIn(ItemStack stack, TagKey<Enchantment> tag)
public static boolean
a(cxp arg0, kt<?> arg1)
has(ItemStack arg0, DataComponentType<?> arg1)
method_60142(class_1799 arg0, class_9331<?> arg1)
hasAnyEnchantmentsWith(ItemStack stack, ComponentType<?> componentType)
public static <T> Optional<T>
b(cxp arg0, kt<List<T>> arg1)
pickHighestLevel(ItemStack arg0, DataComponentType<List<T>> arg1)
method_60165(class_1799 arg0, class_9331<List<T>> arg1)
getEffect(ItemStack stack, ComponentType<List<T>> componentType)
public static <T> com.mojang.datafixers.util.Pair<T, Integer>
c(cxp arg0, kt<T> arg1)
getHighestLevel(ItemStack arg0, DataComponentType<T> arg1)
method_60174(class_1799 arg0, class_9331<T> arg1)
getHighestLevelEffect(ItemStack stack, ComponentType<T> componentType)
public static Optional<EnchantedItemInUse>
a(kt<?> arg0, bwg arg1, Predicate<cxp> arg2)
getRandomItemWith(DataComponentType<?> arg0, LivingEntity arg1, Predicate<ItemStack> arg2)
method_8204(class_9331<?> arg0, class_1309 arg1, Predicate<class_1799> arg2)
chooseEquipmentWith(ComponentType<?> componentType, LivingEntity entity, Predicate<ItemStack> stackPredicate)
public static int
a(bam arg0, int arg1, int arg2, cxp 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)
public static ItemStack
a(bam arg0, cxp arg1, int arg2, ke arg3, Optional<? extends ju<ddz>> arg4)
enchantItem(RandomSource arg0, ItemStack arg1, int arg2, RegistryAccess arg3, Optional<? extends HolderSet<Enchantment>> arg4)
method_60133(class_5819 arg0, class_1799 arg1, int arg2, class_5455 arg3, Optional<? extends class_6885<class_1887>> arg4)
enchant(Random random, ItemStack stack, int level, DynamicRegistryManager dynamicRegistryManager, Optional<? extends RegistryEntryList<Enchantment>> enchantments)
public static ItemStack
a(bam arg0, cxp arg1, int arg2, Stream<jq<ddz>> arg3)
enchantItem(RandomSource arg0, ItemStack arg1, int arg2, Stream<Holder<Enchantment>> arg3)
method_8233(class_5819 arg0, class_1799 arg1, int arg2, Stream<class_6880<class_1887>> arg3)
enchant(Random random, ItemStack stack, int level, Stream<RegistryEntry<Enchantment>> possibleEnchantments)
public static List<EnchantmentInstance>
b(bam arg0, cxp arg1, int arg2, Stream<jq<ddz>> arg3)
selectEnchantment(RandomSource arg0, ItemStack arg1, int arg2, Stream<Holder<Enchantment>> arg3)
method_8230(class_5819 arg0, class_1799 arg1, int arg2, Stream<class_6880<class_1887>> arg3)
generateEnchantments(Random random, ItemStack stack, int level, Stream<RegistryEntry<Enchantment>> possibleEnchantments)
public static void
a(List<dec> arg0, dec arg1)
filterCompatibleEnchantments(List<EnchantmentInstance> arg0, EnchantmentInstance arg1)
method_8231(List<class_1889> arg0, class_1889 arg1)
removeConflicts(List<EnchantmentLevelEntry> possibleEntries, EnchantmentLevelEntry pickedEntry)
public static boolean
a(Collection<jq<ddz>> arg0, jq<ddz> arg1)
isEnchantmentCompatible(Collection<Holder<Enchantment>> arg0, Holder<Enchantment> arg1)
method_8201(Collection<class_6880<class_1887>> arg0, class_6880<class_1887> arg1)
isCompatible(Collection<RegistryEntry<Enchantment>> existing, RegistryEntry<Enchantment> candidate)
public static List<EnchantmentInstance>
a(int arg0, cxp arg1, Stream<jq<ddz>> arg2)
getAvailableEnchantmentResults(int arg0, ItemStack arg1, Stream<Holder<Enchantment>> arg2)
method_8229(int arg0, class_1799 arg1, Stream<class_6880<class_1887>> arg2)
getPossibleEntries(int level, ItemStack stack, Stream<RegistryEntry<Enchantment>> possibleEnchantments)
public static void
a(cxp arg0, ke arg1, aly<dfh> arg2, bth arg3, bam arg4)
enchantItemFromProvider(ItemStack arg0, RegistryAccess arg1, ResourceKey<EnchantmentProvider> arg2, DifficultyInstance arg3, RandomSource arg4)
method_60137(class_1799 arg0, class_5455 arg1, class_5321<class_9741> arg2, class_1266 arg3, class_5819 arg4)
applyEnchantmentProvider(ItemStack stack, DynamicRegistryManager registryManager, RegistryKey<EnchantmentProvider> providerKey, LocalDifficulty localDifficulty, Random random)