net.minecraft.world.item.enchantment

public class EnchantmentHelper

dfh
net.minecraft.world.item.enchantment.EnchantmentHelper
net.minecraft.class_1890
net.minecraft.enchantment.EnchantmentHelper

Constructor summary

ModifierConstructor
public ()

Method summary

Modifier and TypeMethod
public static int
a(je<dff> arg0, cys 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(cys arg0, Consumer<dfl$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(cys arg0)
canStoreEnchantments(ItemStack arg0)
method_57529(class_1799 arg0)
canHaveEnchantments(ItemStack stack)
public static void
a(cys arg0, dfl arg1)
setEnchantments(ItemStack arg0, ItemEnchantments arg1)
method_57530(class_1799 arg0, class_9304 arg1)
set(ItemStack stack, ItemEnchantmentsComponent enchantments)
public static ItemEnchantments
b(cys arg0)
getEnchantmentsForCrafting(ItemStack arg0)
method_57532(class_1799 arg0)
getEnchantments(ItemStack stack)
private static DataComponentType<ItemEnchantments>
d(cys arg0)
getComponentType(ItemStack arg0)
method_57533(class_1799 arg0)
getEnchantmentsComponentType(ItemStack stack)
public static boolean
c(cys arg0)
hasAnyEnchantments(ItemStack arg0)
method_58117(class_1799 arg0)
hasEnchantments(ItemStack stack)
public static int
a(aro arg0, cys 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(aro arg0, cys arg1, cys 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(aro arg0, cys 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(aro arg0, bwa arg1, bwa 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(dfi arg0)
createBook(EnchantmentInstance arg0)
method_61711(class_1889 arg0)
getEnchantedBookWith(EnchantmentLevelEntry entry)
private static void
a(cys arg0, dfh$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(cys arg0, bwk arg1, bwz arg2, dfh$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(bwz arg0, dfh$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(aro arg0, bwz arg1, bup 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(aro arg0, bwz arg1, bup 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(aro arg0, cys arg1, bwa arg2, bup 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(aro arg0, cys arg1, bwa arg2, bup 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(aro arg0, cys arg1, bwa arg2, bup 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(aro arg0, cys arg1, bwa arg2, bup 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(aro arg0, bwa arg1, bup 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(aro arg0, bwa arg1, bup arg2, cys 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(aro arg0, bwa arg1, bup arg2, cys arg3, Consumer<cyo> 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(aro arg0, bwz arg1)
runLocationChangedEffects(ServerLevel arg0, LivingEntity arg1)
method_60111(class_3218 arg0, class_1309 arg1)
applyLocationBasedEffects(ServerWorld world, LivingEntity user)
public static void
a(aro arg0, cys arg1, bwz arg2, bwk 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(bwz arg0)
stopLocationBasedEffects(LivingEntity arg0)
method_60135(class_1309 arg0)
removeLocationBasedEffects(LivingEntity user)
public static void
a(cys arg0, bwz arg1, bwk 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(aro arg0, bwz arg1)
tickEffects(ServerLevel arg0, LivingEntity arg1)
method_60154(class_3218 arg0, class_1309 arg1)
onTick(ServerWorld world, LivingEntity user)
public static int
a(je<dff> arg0, bwz 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(aro arg0, cys arg1, bwa 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(aro arg0, cys arg1, bwa 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(aro arg0, cys arg1, cys 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(aro arg0, cys arg1, crm arg2, Consumer<cyo> 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(aro arg0, cys arg1, bwz arg2, bwa arg3, bwk arg4, fdw arg5, dzo arg6, Consumer<cyo> 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(aro arg0, cys arg1, int arg2)
modifyDurabilityToRepairFromXp(ServerLevel arg0, ItemStack arg1, int arg2)
method_60168(class_3218 arg0, class_1799 arg1, int arg2)
getRepairWithExperience(ServerWorld world, ItemStack stack, int baseRepairWithExperience)
public static float
a(aro arg0, bwz arg1, bup 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(cys arg0, bwl arg1, BiConsumer<je<bya>, byd> 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(cys arg0, bwk arg1, BiConsumer<je<bya>, byd> 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(aro arg0, cys arg1, bwa 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(aro arg0, cys arg1, bwa 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(aro arg0, cys arg1, bwa 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(cys arg0, bwz 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(cys arg0, bwz arg1)
getTridentSpinAttackStrength(ItemStack arg0, LivingEntity arg1)
method_60123(class_1799 arg0, class_1309 arg1)
getTridentSpinAttackStrength(ItemStack stack, LivingEntity user)
public static boolean
a(cys arg0, axp<dff> 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(cys arg0, ki<?> 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(cys arg0, ki<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(cys arg0, ki<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(ki<?> arg0, bwz arg1, Predicate<cys> 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(azt arg0, int arg1, int arg2, cys 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(azt arg0, cys arg1, int arg2, js arg3, Optional<? extends ji<dff>> 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(azt arg0, cys arg1, int arg2, Stream<je<dff>> 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(azt arg0, cys arg1, int arg2, Stream<je<dff>> 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<dfi> arg0, dfi 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<je<dff>> arg0, je<dff> 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, cys arg1, Stream<je<dff>> 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(cys arg0, js arg1, ald<dgn> arg2, btw arg3, azt 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)