Class EnchantmentHelper

java.lang.Object
net.minecraft.enchantment.EnchantmentHelper

public class EnchantmentHelper extends Object
Mappings:
Namespace Name
named net/minecraft/enchantment/EnchantmentHelper
intermediary net/minecraft/class_1890
official dae
  • Constructor Details

    • EnchantmentHelper

      public EnchantmentHelper()
  • Method Details

    • getLevel

      public static int getLevel(RegistryEntry<Enchantment> enchantment, ItemStack stack)
      Gets the level of an enchantment on an item stack.
      Mappings:
      Namespace Name Mixin selector
      named getLevel Lnet/minecraft/enchantment/EnchantmentHelper;getLevel(Lnet/minecraft/registry/entry/RegistryEntry;Lnet/minecraft/item/ItemStack;)I
      intermediary method_8225 Lnet/minecraft/class_1890;method_8225(Lnet/minecraft/class_6880;Lnet/minecraft/class_1799;)I
      official a Ldae;a(Ljm;Lcuq;)I
    • apply

      Mappings:
      Namespace Name Mixin selector
      named apply Lnet/minecraft/enchantment/EnchantmentHelper;apply(Lnet/minecraft/item/ItemStack;Ljava/util/function/Consumer;)Lnet/minecraft/component/type/ItemEnchantmentsComponent;
      intermediary method_57531 Lnet/minecraft/class_1890;method_57531(Lnet/minecraft/class_1799;Ljava/util/function/Consumer;)Lnet/minecraft/class_9304;
      official a Ldae;a(Lcuq;Ljava/util/function/Consumer;)Ldai;
    • canHaveEnchantments

      public static boolean canHaveEnchantments(ItemStack stack)
      Mappings:
      Namespace Name Mixin selector
      named canHaveEnchantments Lnet/minecraft/enchantment/EnchantmentHelper;canHaveEnchantments(Lnet/minecraft/item/ItemStack;)Z
      intermediary method_57529 Lnet/minecraft/class_1890;method_57529(Lnet/minecraft/class_1799;)Z
      official a Ldae;a(Lcuq;)Z
    • set

      public static void set(ItemStack stack, ItemEnchantmentsComponent enchantments)
      Mappings:
      Namespace Name Mixin selector
      named set Lnet/minecraft/enchantment/EnchantmentHelper;set(Lnet/minecraft/item/ItemStack;Lnet/minecraft/component/type/ItemEnchantmentsComponent;)V
      intermediary method_57530 Lnet/minecraft/class_1890;method_57530(Lnet/minecraft/class_1799;Lnet/minecraft/class_9304;)V
      official a Ldae;a(Lcuq;Ldai;)V
    • getEnchantments

      public static ItemEnchantmentsComponent getEnchantments(ItemStack stack)
      Mappings:
      Namespace Name Mixin selector
      named getEnchantments Lnet/minecraft/enchantment/EnchantmentHelper;getEnchantments(Lnet/minecraft/item/ItemStack;)Lnet/minecraft/component/type/ItemEnchantmentsComponent;
      intermediary method_57532 Lnet/minecraft/class_1890;method_57532(Lnet/minecraft/class_1799;)Lnet/minecraft/class_9304;
      official b Ldae;b(Lcuq;)Ldai;
    • getEnchantmentsComponentType

      private static ComponentType<ItemEnchantmentsComponent> getEnchantmentsComponentType(ItemStack stack)
      Mappings:
      Namespace Name Mixin selector
      named getEnchantmentsComponentType Lnet/minecraft/enchantment/EnchantmentHelper;getEnchantmentsComponentType(Lnet/minecraft/item/ItemStack;)Lnet/minecraft/component/ComponentType;
      intermediary method_57533 Lnet/minecraft/class_1890;method_57533(Lnet/minecraft/class_1799;)Lnet/minecraft/class_9331;
      official d Ldae;d(Lcuq;)Lkp;
    • hasEnchantments

      public static boolean hasEnchantments(ItemStack stack)
      Mappings:
      Namespace Name Mixin selector
      named hasEnchantments Lnet/minecraft/enchantment/EnchantmentHelper;hasEnchantments(Lnet/minecraft/item/ItemStack;)Z
      intermediary method_58117 Lnet/minecraft/class_1890;method_58117(Lnet/minecraft/class_1799;)Z
      official c Ldae;c(Lcuq;)Z
    • getItemDamage

      public static int getItemDamage(ServerWorld world, ItemStack stack, int baseItemDamage)
      Mappings:
      Namespace Name Mixin selector
      named getItemDamage Lnet/minecraft/enchantment/EnchantmentHelper;getItemDamage(Lnet/minecraft/server/world/ServerWorld;Lnet/minecraft/item/ItemStack;I)I
      intermediary method_60117 Lnet/minecraft/class_1890;method_60117(Lnet/minecraft/class_3218;Lnet/minecraft/class_1799;I)I
      official a Ldae;a(Laqu;Lcuq;I)I
    • getAmmoUse

      public static int getAmmoUse(ServerWorld world, ItemStack rangedWeaponStack, ItemStack projectileStack, int baseAmmoUse)
      Mappings:
      Namespace Name Mixin selector
      named getAmmoUse Lnet/minecraft/enchantment/EnchantmentHelper;getAmmoUse(Lnet/minecraft/server/world/ServerWorld;Lnet/minecraft/item/ItemStack;Lnet/minecraft/item/ItemStack;I)I
      intermediary method_60129 Lnet/minecraft/class_1890;method_60129(Lnet/minecraft/class_3218;Lnet/minecraft/class_1799;Lnet/minecraft/class_1799;I)I
      official a Ldae;a(Laqu;Lcuq;Lcuq;I)I
    • getBlockExperience

      public static int getBlockExperience(ServerWorld world, ItemStack stack, int baseBlockExperience)
      Mappings:
      Namespace Name Mixin selector
      named getBlockExperience Lnet/minecraft/enchantment/EnchantmentHelper;getBlockExperience(Lnet/minecraft/server/world/ServerWorld;Lnet/minecraft/item/ItemStack;I)I
      intermediary method_60157 Lnet/minecraft/class_1890;method_60157(Lnet/minecraft/class_3218;Lnet/minecraft/class_1799;I)I
      official b Ldae;b(Laqu;Lcuq;I)I
    • getMobExperience

      public static int getMobExperience(ServerWorld world, @Nullable @Nullable Entity attacker, Entity mob, int baseMobExperience)
      Mappings:
      Namespace Name Mixin selector
      named getMobExperience Lnet/minecraft/enchantment/EnchantmentHelper;getMobExperience(Lnet/minecraft/server/world/ServerWorld;Lnet/minecraft/entity/Entity;Lnet/minecraft/entity/Entity;I)I
      intermediary method_60109 Lnet/minecraft/class_1890;method_60109(Lnet/minecraft/class_3218;Lnet/minecraft/class_1297;Lnet/minecraft/class_1297;I)I
      official a Ldae;a(Laqu;Lbsr;Lbsr;I)I
    • forEachEnchantment

      private static void forEachEnchantment(ItemStack stack, EnchantmentHelper.Consumer consumer)
      Mappings:
      Namespace Name Mixin selector
      named forEachEnchantment Lnet/minecraft/enchantment/EnchantmentHelper;forEachEnchantment(Lnet/minecraft/item/ItemStack;Lnet/minecraft/enchantment/EnchantmentHelper$Consumer;)V
      intermediary method_8220 Lnet/minecraft/class_1890;method_8220(Lnet/minecraft/class_1799;Lnet/minecraft/class_1890$class_1891;)V
      official a Ldae;a(Lcuq;Ldae$b;)V
    • forEachEnchantment

      private static void forEachEnchantment(ItemStack stack, EquipmentSlot slot, LivingEntity entity, EnchantmentHelper.ContextAwareConsumer contextAwareConsumer)
      Mappings:
      Namespace Name Mixin selector
      named forEachEnchantment Lnet/minecraft/enchantment/EnchantmentHelper;forEachEnchantment(Lnet/minecraft/item/ItemStack;Lnet/minecraft/entity/EquipmentSlot;Lnet/minecraft/entity/LivingEntity;Lnet/minecraft/enchantment/EnchantmentHelper$ContextAwareConsumer;)V
      intermediary method_60139 Lnet/minecraft/class_1890;method_60139(Lnet/minecraft/class_1799;Lnet/minecraft/class_1304;Lnet/minecraft/class_1309;Lnet/minecraft/class_1890$class_9702;)V
      official a Ldae;a(Lcuq;Lbsy;Lbtn;Ldae$a;)V
    • forEachEnchantment

      private static void forEachEnchantment(LivingEntity entity, EnchantmentHelper.ContextAwareConsumer contextAwareConsumer)
      Mappings:
      Namespace Name Mixin selector
      named forEachEnchantment Lnet/minecraft/enchantment/EnchantmentHelper;forEachEnchantment(Lnet/minecraft/entity/LivingEntity;Lnet/minecraft/enchantment/EnchantmentHelper$ContextAwareConsumer;)V
      intermediary method_8209 Lnet/minecraft/class_1890;method_8209(Lnet/minecraft/class_1309;Lnet/minecraft/class_1890$class_9702;)V
      official a Ldae;a(Lbtn;Ldae$a;)V
    • isInvulnerableTo

      public static boolean isInvulnerableTo(ServerWorld world, LivingEntity user, DamageSource damageSource)
      Mappings:
      Namespace Name Mixin selector
      named isInvulnerableTo Lnet/minecraft/enchantment/EnchantmentHelper;isInvulnerableTo(Lnet/minecraft/server/world/ServerWorld;Lnet/minecraft/entity/LivingEntity;Lnet/minecraft/entity/damage/DamageSource;)Z
      intermediary method_60112 Lnet/minecraft/class_1890;method_60112(Lnet/minecraft/class_3218;Lnet/minecraft/class_1309;Lnet/minecraft/class_1282;)Z
      official a Ldae;a(Laqu;Lbtn;Lbrk;)Z
    • getProtectionAmount

      public static float getProtectionAmount(ServerWorld world, LivingEntity user, DamageSource damageSource)
      Mappings:
      Namespace Name Mixin selector
      named getProtectionAmount Lnet/minecraft/enchantment/EnchantmentHelper;getProtectionAmount(Lnet/minecraft/server/world/ServerWorld;Lnet/minecraft/entity/LivingEntity;Lnet/minecraft/entity/damage/DamageSource;)F
      intermediary method_8219 Lnet/minecraft/class_1890;method_8219(Lnet/minecraft/class_3218;Lnet/minecraft/class_1309;Lnet/minecraft/class_1282;)F
      official b Ldae;b(Laqu;Lbtn;Lbrk;)F
    • getDamage

      public static float getDamage(ServerWorld world, ItemStack stack, Entity target, DamageSource damageSource, float baseDamage)
      Mappings:
      Namespace Name Mixin selector
      named getDamage Lnet/minecraft/enchantment/EnchantmentHelper;getDamage(Lnet/minecraft/server/world/ServerWorld;Lnet/minecraft/item/ItemStack;Lnet/minecraft/entity/Entity;Lnet/minecraft/entity/damage/DamageSource;F)F
      intermediary method_60120 Lnet/minecraft/class_1890;method_60120(Lnet/minecraft/class_3218;Lnet/minecraft/class_1799;Lnet/minecraft/class_1297;Lnet/minecraft/class_1282;F)F
      official a Ldae;a(Laqu;Lcuq;Lbsr;Lbrk;F)F
    • getSmashDamagePerFallenBlock

      public static float getSmashDamagePerFallenBlock(ServerWorld world, ItemStack stack, Entity target, DamageSource damageSource, float baseSmashDamagePerFallenBlock)
      Mappings:
      Namespace Name Mixin selector
      named getSmashDamagePerFallenBlock Lnet/minecraft/enchantment/EnchantmentHelper;getSmashDamagePerFallenBlock(Lnet/minecraft/server/world/ServerWorld;Lnet/minecraft/item/ItemStack;Lnet/minecraft/entity/Entity;Lnet/minecraft/entity/damage/DamageSource;F)F
      intermediary method_60160 Lnet/minecraft/class_1890;method_60160(Lnet/minecraft/class_3218;Lnet/minecraft/class_1799;Lnet/minecraft/class_1297;Lnet/minecraft/class_1282;F)F
      official b Ldae;b(Laqu;Lcuq;Lbsr;Lbrk;F)F
    • getArmorEffectiveness

      public static float getArmorEffectiveness(ServerWorld world, ItemStack stack, Entity user, DamageSource damageSource, float baseArmorEffectiveness)
      Mappings:
      Namespace Name Mixin selector
      named getArmorEffectiveness Lnet/minecraft/enchantment/EnchantmentHelper;getArmorEffectiveness(Lnet/minecraft/server/world/ServerWorld;Lnet/minecraft/item/ItemStack;Lnet/minecraft/entity/Entity;Lnet/minecraft/entity/damage/DamageSource;F)F
      intermediary method_60170 Lnet/minecraft/class_1890;method_60170(Lnet/minecraft/class_3218;Lnet/minecraft/class_1799;Lnet/minecraft/class_1297;Lnet/minecraft/class_1282;F)F
      official c Ldae;c(Laqu;Lcuq;Lbsr;Lbrk;F)F
    • modifyKnockback

      public static float modifyKnockback(ServerWorld world, ItemStack stack, Entity target, DamageSource damageSource, float baseKnockback)
      Mappings:
      Namespace Name Mixin selector
      named modifyKnockback Lnet/minecraft/enchantment/EnchantmentHelper;modifyKnockback(Lnet/minecraft/server/world/ServerWorld;Lnet/minecraft/item/ItemStack;Lnet/minecraft/entity/Entity;Lnet/minecraft/entity/damage/DamageSource;F)F
      intermediary method_60175 Lnet/minecraft/class_1890;method_60175(Lnet/minecraft/class_3218;Lnet/minecraft/class_1799;Lnet/minecraft/class_1297;Lnet/minecraft/class_1282;F)F
      official d Ldae;d(Laqu;Lcuq;Lbsr;Lbrk;F)F
    • onTargetDamaged

      public static void onTargetDamaged(ServerWorld world, Entity target, DamageSource damageSource)
      Mappings:
      Namespace Name Mixin selector
      named onTargetDamaged Lnet/minecraft/enchantment/EnchantmentHelper;onTargetDamaged(Lnet/minecraft/server/world/ServerWorld;Lnet/minecraft/entity/Entity;Lnet/minecraft/entity/damage/DamageSource;)V
      intermediary method_60107 Lnet/minecraft/class_1890;method_60107(Lnet/minecraft/class_3218;Lnet/minecraft/class_1297;Lnet/minecraft/class_1282;)V
      official a Ldae;a(Laqu;Lbsr;Lbrk;)V
    • onTargetDamaged

      public static void onTargetDamaged(ServerWorld world, Entity target, DamageSource damageSource, @Nullable @Nullable ItemStack weapon)
      Mappings:
      Namespace Name Mixin selector
      named onTargetDamaged Lnet/minecraft/enchantment/EnchantmentHelper;onTargetDamaged(Lnet/minecraft/server/world/ServerWorld;Lnet/minecraft/entity/Entity;Lnet/minecraft/entity/damage/DamageSource;Lnet/minecraft/item/ItemStack;)V
      intermediary method_60619 Lnet/minecraft/class_1890;method_60619(Lnet/minecraft/class_3218;Lnet/minecraft/class_1297;Lnet/minecraft/class_1282;Lnet/minecraft/class_1799;)V
      official a Ldae;a(Laqu;Lbsr;Lbrk;Lcuq;)V
    • applyLocationBasedEffects

      public static void applyLocationBasedEffects(ServerWorld world, LivingEntity user)
      Mappings:
      Namespace Name Mixin selector
      named applyLocationBasedEffects Lnet/minecraft/enchantment/EnchantmentHelper;applyLocationBasedEffects(Lnet/minecraft/server/world/ServerWorld;Lnet/minecraft/entity/LivingEntity;)V
      intermediary method_60111 Lnet/minecraft/class_1890;method_60111(Lnet/minecraft/class_3218;Lnet/minecraft/class_1309;)V
      official a Ldae;a(Laqu;Lbtn;)V
    • applyLocationBasedEffects

      public static void applyLocationBasedEffects(ServerWorld world, ItemStack stack, LivingEntity user, EquipmentSlot slot)
      Mappings:
      Namespace Name Mixin selector
      named applyLocationBasedEffects Lnet/minecraft/enchantment/EnchantmentHelper;applyLocationBasedEffects(Lnet/minecraft/server/world/ServerWorld;Lnet/minecraft/item/ItemStack;Lnet/minecraft/entity/LivingEntity;Lnet/minecraft/entity/EquipmentSlot;)V
      intermediary method_60125 Lnet/minecraft/class_1890;method_60125(Lnet/minecraft/class_3218;Lnet/minecraft/class_1799;Lnet/minecraft/class_1309;Lnet/minecraft/class_1304;)V
      official a Ldae;a(Laqu;Lcuq;Lbtn;Lbsy;)V
    • removeLocationBasedEffects

      public static void removeLocationBasedEffects(LivingEntity user)
      Mappings:
      Namespace Name Mixin selector
      named removeLocationBasedEffects Lnet/minecraft/enchantment/EnchantmentHelper;removeLocationBasedEffects(Lnet/minecraft/entity/LivingEntity;)V
      intermediary method_60135 Lnet/minecraft/class_1890;method_60135(Lnet/minecraft/class_1309;)V
      official a Ldae;a(Lbtn;)V
    • removeLocationBasedEffects

      public static void removeLocationBasedEffects(ItemStack stack, LivingEntity user, EquipmentSlot slot)
      Mappings:
      Namespace Name Mixin selector
      named removeLocationBasedEffects Lnet/minecraft/enchantment/EnchantmentHelper;removeLocationBasedEffects(Lnet/minecraft/item/ItemStack;Lnet/minecraft/entity/LivingEntity;Lnet/minecraft/entity/EquipmentSlot;)V
      intermediary method_60141 Lnet/minecraft/class_1890;method_60141(Lnet/minecraft/class_1799;Lnet/minecraft/class_1309;Lnet/minecraft/class_1304;)V
      official a Ldae;a(Lcuq;Lbtn;Lbsy;)V
    • onTick

      public static void onTick(ServerWorld world, LivingEntity user)
      Mappings:
      Namespace Name Mixin selector
      named onTick Lnet/minecraft/enchantment/EnchantmentHelper;onTick(Lnet/minecraft/server/world/ServerWorld;Lnet/minecraft/entity/LivingEntity;)V
      intermediary method_60154 Lnet/minecraft/class_1890;method_60154(Lnet/minecraft/class_3218;Lnet/minecraft/class_1309;)V
      official b Ldae;b(Laqu;Lbtn;)V
    • getEquipmentLevel

      public static int getEquipmentLevel(RegistryEntry<Enchantment> enchantment, LivingEntity entity)
      Returns the highest level of the passed enchantment in the enchantment's applicable equipment slots' item stacks.
      Parameters:
      entity - the entity whose equipment slots are checked
      Returns:
      the highest level of the passed enchantment in the enchantment's applicable equipment slots' item stacks
      Mappings:
      Namespace Name Mixin selector
      named getEquipmentLevel Lnet/minecraft/enchantment/EnchantmentHelper;getEquipmentLevel(Lnet/minecraft/registry/entry/RegistryEntry;Lnet/minecraft/entity/LivingEntity;)I
      intermediary method_8203 Lnet/minecraft/class_1890;method_8203(Lnet/minecraft/class_6880;Lnet/minecraft/class_1309;)I
      official a Ldae;a(Ljm;Lbtn;)I
    • getProjectileCount

      public static int getProjectileCount(ServerWorld world, ItemStack stack, Entity user, int baseProjectileCount)
      Mappings:
      Namespace Name Mixin selector
      named getProjectileCount Lnet/minecraft/enchantment/EnchantmentHelper;getProjectileCount(Lnet/minecraft/server/world/ServerWorld;Lnet/minecraft/item/ItemStack;Lnet/minecraft/entity/Entity;I)I
      intermediary method_60119 Lnet/minecraft/class_1890;method_60119(Lnet/minecraft/class_3218;Lnet/minecraft/class_1799;Lnet/minecraft/class_1297;I)I
      official a Ldae;a(Laqu;Lcuq;Lbsr;I)I
    • getProjectileSpread

      public static float getProjectileSpread(ServerWorld world, ItemStack stack, Entity user, float baseProjectileSpread)
      Mappings:
      Namespace Name Mixin selector
      named getProjectileSpread Lnet/minecraft/enchantment/EnchantmentHelper;getProjectileSpread(Lnet/minecraft/server/world/ServerWorld;Lnet/minecraft/item/ItemStack;Lnet/minecraft/entity/Entity;F)F
      intermediary method_60118 Lnet/minecraft/class_1890;method_60118(Lnet/minecraft/class_3218;Lnet/minecraft/class_1799;Lnet/minecraft/class_1297;F)F
      official a Ldae;a(Laqu;Lcuq;Lbsr;F)F
    • getProjectilePiercing

      public static int getProjectilePiercing(ServerWorld world, ItemStack weaponStack, ItemStack projectileStack)
      Mappings:
      Namespace Name Mixin selector
      named getProjectilePiercing Lnet/minecraft/enchantment/EnchantmentHelper;getProjectilePiercing(Lnet/minecraft/server/world/ServerWorld;Lnet/minecraft/item/ItemStack;Lnet/minecraft/item/ItemStack;)I
      intermediary method_60128 Lnet/minecraft/class_1890;method_60128(Lnet/minecraft/class_3218;Lnet/minecraft/class_1799;Lnet/minecraft/class_1799;)I
      official a Ldae;a(Laqu;Lcuq;Lcuq;)I
    • onProjectileSpawned

      public static void onProjectileSpawned(ServerWorld world, ItemStack weaponStack, PersistentProjectileEntity projectileEntity, Consumer<Item> onBreak)
      Mappings:
      Namespace Name Mixin selector
      named onProjectileSpawned Lnet/minecraft/enchantment/EnchantmentHelper;onProjectileSpawned(Lnet/minecraft/server/world/ServerWorld;Lnet/minecraft/item/ItemStack;Lnet/minecraft/entity/projectile/PersistentProjectileEntity;Ljava/util/function/Consumer;)V
      intermediary method_60127 Lnet/minecraft/class_1890;method_60127(Lnet/minecraft/class_3218;Lnet/minecraft/class_1799;Lnet/minecraft/class_1665;Ljava/util/function/Consumer;)V
      official a Ldae;a(Laqu;Lcuq;Lcnd;Ljava/util/function/Consumer;)V
    • onHitBlock

      public static void onHitBlock(ServerWorld world, ItemStack stack, @Nullable @Nullable LivingEntity user, Entity enchantedEntity, @Nullable @Nullable EquipmentSlot slot, Vec3d pos, BlockState state, Consumer<Item> onBreak)
      Mappings:
      Namespace Name Mixin selector
      named onHitBlock Lnet/minecraft/enchantment/EnchantmentHelper;onHitBlock(Lnet/minecraft/server/world/ServerWorld;Lnet/minecraft/item/ItemStack;Lnet/minecraft/entity/LivingEntity;Lnet/minecraft/entity/Entity;Lnet/minecraft/entity/EquipmentSlot;Lnet/minecraft/util/math/Vec3d;Lnet/minecraft/block/BlockState;Ljava/util/function/Consumer;)V
      intermediary method_60124 Lnet/minecraft/class_1890;method_60124(Lnet/minecraft/class_3218;Lnet/minecraft/class_1799;Lnet/minecraft/class_1309;Lnet/minecraft/class_1297;Lnet/minecraft/class_1304;Lnet/minecraft/class_243;Lnet/minecraft/class_2680;Ljava/util/function/Consumer;)V
      official a Ldae;a(Laqu;Lcuq;Lbtn;Lbsr;Lbsy;Lexc;Ldtc;Ljava/util/function/Consumer;)V
    • getRepairWithXp

      public static int getRepairWithXp(ServerWorld world, ItemStack stack, int baseRepairWithXp)
      Mappings:
      Namespace Name Mixin selector
      named getRepairWithXp Lnet/minecraft/enchantment/EnchantmentHelper;getRepairWithXp(Lnet/minecraft/server/world/ServerWorld;Lnet/minecraft/item/ItemStack;I)I
      intermediary method_60168 Lnet/minecraft/class_1890;method_60168(Lnet/minecraft/class_3218;Lnet/minecraft/class_1799;I)I
      official c Ldae;c(Laqu;Lcuq;I)I
    • getEquipmentDropChance

      public static float getEquipmentDropChance(ServerWorld world, LivingEntity attacker, DamageSource damageSource, float baseEquipmentDropChance)
      Mappings:
      Namespace Name Mixin selector
      named getEquipmentDropChance Lnet/minecraft/enchantment/EnchantmentHelper;getEquipmentDropChance(Lnet/minecraft/server/world/ServerWorld;Lnet/minecraft/entity/LivingEntity;Lnet/minecraft/entity/damage/DamageSource;F)F
      intermediary method_60113 Lnet/minecraft/class_1890;method_60113(Lnet/minecraft/class_3218;Lnet/minecraft/class_1309;Lnet/minecraft/class_1282;F)F
      official a Ldae;a(Laqu;Lbtn;Lbrk;F)F
    • applyAttributeModifiers

      public static void applyAttributeModifiers(ItemStack stack, AttributeModifierSlot slot, BiConsumer<RegistryEntry<EntityAttribute>,EntityAttributeModifier> attributeModifierConsumer)
      Mappings:
      Namespace Name Mixin selector
      named applyAttributeModifiers Lnet/minecraft/enchantment/EnchantmentHelper;applyAttributeModifiers(Lnet/minecraft/item/ItemStack;Lnet/minecraft/component/type/AttributeModifierSlot;Ljava/util/function/BiConsumer;)V
      intermediary method_60622 Lnet/minecraft/class_1890;method_60622(Lnet/minecraft/class_1799;Lnet/minecraft/class_9274;Ljava/util/function/BiConsumer;)V
      official a Ldae;a(Lcuq;Lbsz;Ljava/util/function/BiConsumer;)V
    • applyAttributeModifiers

      public static void applyAttributeModifiers(ItemStack stack, EquipmentSlot slot, BiConsumer<RegistryEntry<EntityAttribute>,EntityAttributeModifier> attributeModifierConsumer)
      Mappings:
      Namespace Name Mixin selector
      named applyAttributeModifiers Lnet/minecraft/enchantment/EnchantmentHelper;applyAttributeModifiers(Lnet/minecraft/item/ItemStack;Lnet/minecraft/entity/EquipmentSlot;Ljava/util/function/BiConsumer;)V
      intermediary method_60140 Lnet/minecraft/class_1890;method_60140(Lnet/minecraft/class_1799;Lnet/minecraft/class_1304;Ljava/util/function/BiConsumer;)V
      official a Ldae;a(Lcuq;Lbsy;Ljava/util/function/BiConsumer;)V
    • getFishingLuckBonus

      public static int getFishingLuckBonus(ServerWorld world, ItemStack stack, Entity user)
      Mappings:
      Namespace Name Mixin selector
      named getFishingLuckBonus Lnet/minecraft/enchantment/EnchantmentHelper;getFishingLuckBonus(Lnet/minecraft/server/world/ServerWorld;Lnet/minecraft/item/ItemStack;Lnet/minecraft/entity/Entity;)I
      intermediary method_8223 Lnet/minecraft/class_1890;method_8223(Lnet/minecraft/class_3218;Lnet/minecraft/class_1799;Lnet/minecraft/class_1297;)I
      official a Ldae;a(Laqu;Lcuq;Lbsr;)I
    • getFishingTimeReduction

      public static float getFishingTimeReduction(ServerWorld world, ItemStack stack, Entity user)
      Mappings:
      Namespace Name Mixin selector
      named getFishingTimeReduction Lnet/minecraft/enchantment/EnchantmentHelper;getFishingTimeReduction(Lnet/minecraft/server/world/ServerWorld;Lnet/minecraft/item/ItemStack;Lnet/minecraft/entity/Entity;)F
      intermediary method_60158 Lnet/minecraft/class_1890;method_60158(Lnet/minecraft/class_3218;Lnet/minecraft/class_1799;Lnet/minecraft/class_1297;)F
      official b Ldae;b(Laqu;Lcuq;Lbsr;)F
    • getTridentReturnAcceleration

      public static int getTridentReturnAcceleration(ServerWorld world, ItemStack stack, Entity user)
      Mappings:
      Namespace Name Mixin selector
      named getTridentReturnAcceleration Lnet/minecraft/enchantment/EnchantmentHelper;getTridentReturnAcceleration(Lnet/minecraft/server/world/ServerWorld;Lnet/minecraft/item/ItemStack;Lnet/minecraft/entity/Entity;)I
      intermediary method_60169 Lnet/minecraft/class_1890;method_60169(Lnet/minecraft/class_3218;Lnet/minecraft/class_1799;Lnet/minecraft/class_1297;)I
      official c Ldae;c(Laqu;Lcuq;Lbsr;)I
    • getCrossbowChargeTime

      public static float getCrossbowChargeTime(ItemStack stack, LivingEntity user, float baseCrossbowChargeTime)
      Mappings:
      Namespace Name Mixin selector
      named getCrossbowChargeTime Lnet/minecraft/enchantment/EnchantmentHelper;getCrossbowChargeTime(Lnet/minecraft/item/ItemStack;Lnet/minecraft/entity/LivingEntity;F)F
      intermediary method_60159 Lnet/minecraft/class_1890;method_60159(Lnet/minecraft/class_1799;Lnet/minecraft/class_1309;F)F
      official a Ldae;a(Lcuq;Lbtn;F)F
    • getTridentSpinAttackStrength

      public static float getTridentSpinAttackStrength(ItemStack stack, LivingEntity user)
      Mappings:
      Namespace Name Mixin selector
      named getTridentSpinAttackStrength Lnet/minecraft/enchantment/EnchantmentHelper;getTridentSpinAttackStrength(Lnet/minecraft/item/ItemStack;Lnet/minecraft/entity/LivingEntity;)F
      intermediary method_60123 Lnet/minecraft/class_1890;method_60123(Lnet/minecraft/class_1799;Lnet/minecraft/class_1309;)F
      official a Ldae;a(Lcuq;Lbtn;)F
    • hasAnyEnchantmentsIn

      public static boolean hasAnyEnchantmentsIn(ItemStack stack, TagKey<Enchantment> tag)
      Mappings:
      Namespace Name Mixin selector
      named hasAnyEnchantmentsIn Lnet/minecraft/enchantment/EnchantmentHelper;hasAnyEnchantmentsIn(Lnet/minecraft/item/ItemStack;Lnet/minecraft/registry/tag/TagKey;)Z
      intermediary method_60138 Lnet/minecraft/class_1890;method_60138(Lnet/minecraft/class_1799;Lnet/minecraft/class_6862;)Z
      official a Ldae;a(Lcuq;Lawu;)Z
    • hasAnyEnchantmentsWith

      public static boolean hasAnyEnchantmentsWith(ItemStack stack, ComponentType<?> componentType)
      Mappings:
      Namespace Name Mixin selector
      named hasAnyEnchantmentsWith Lnet/minecraft/enchantment/EnchantmentHelper;hasAnyEnchantmentsWith(Lnet/minecraft/item/ItemStack;Lnet/minecraft/component/ComponentType;)Z
      intermediary method_60142 Lnet/minecraft/class_1890;method_60142(Lnet/minecraft/class_1799;Lnet/minecraft/class_9331;)Z
      official a Ldae;a(Lcuq;Lkp;)Z
    • getEffect

      public static <T> Optional<T> getEffect(ItemStack stack, ComponentType<List<T>> componentType)
      Mappings:
      Namespace Name Mixin selector
      named getEffect Lnet/minecraft/enchantment/EnchantmentHelper;getEffect(Lnet/minecraft/item/ItemStack;Lnet/minecraft/component/ComponentType;)Ljava/util/Optional;
      intermediary method_60165 Lnet/minecraft/class_1890;method_60165(Lnet/minecraft/class_1799;Lnet/minecraft/class_9331;)Ljava/util/Optional;
      official b Ldae;b(Lcuq;Lkp;)Ljava/util/Optional;
    • getEffectListAndLevel

      @Nullable public static <T> @Nullable com.mojang.datafixers.util.Pair<T,Integer> getEffectListAndLevel(ItemStack stack, ComponentType<T> componentType)
      Mappings:
      Namespace Name Mixin selector
      named getEffectListAndLevel Lnet/minecraft/enchantment/EnchantmentHelper;getEffectListAndLevel(Lnet/minecraft/item/ItemStack;Lnet/minecraft/component/ComponentType;)Lcom/mojang/datafixers/util/Pair;
      intermediary method_60174 Lnet/minecraft/class_1890;method_60174(Lnet/minecraft/class_1799;Lnet/minecraft/class_9331;)Lcom/mojang/datafixers/util/Pair;
      official c Ldae;c(Lcuq;Lkp;)Lcom/mojang/datafixers/util/Pair;
    • chooseEquipmentWith

      public static Optional<EnchantmentEffectContext> chooseEquipmentWith(ComponentType<?> componentType, LivingEntity entity, Predicate<ItemStack> stackPredicate)
      Returns a pair of an equipment slot and the item stack in the supplied entity's slot. It indicates the item stack has the enchantment supplied.

      If multiple equipment slots' item stacks are valid, a random pair is returned.

      Returns:
      a pair of an equipment slot and the item stack in the supplied entity's slot
      Mappings:
      Namespace Name Mixin selector
      named chooseEquipmentWith Lnet/minecraft/enchantment/EnchantmentHelper;chooseEquipmentWith(Lnet/minecraft/component/ComponentType;Lnet/minecraft/entity/LivingEntity;Ljava/util/function/Predicate;)Ljava/util/Optional;
      intermediary method_8204 Lnet/minecraft/class_1890;method_8204(Lnet/minecraft/class_9331;Lnet/minecraft/class_1309;Ljava/util/function/Predicate;)Ljava/util/Optional;
      official a Ldae;a(Lkp;Lbtn;Ljava/util/function/Predicate;)Ljava/util/Optional;
    • calculateRequiredExperienceLevel

      public static int calculateRequiredExperienceLevel(Random random, int slotIndex, int bookshelfCount, ItemStack stack)
      Returns the required experience level for an enchanting option in the enchanting table's screen, or the enchantment screen.
      Parameters:
      random - the random, which guarantees consistent results with the same seed
      slotIndex - the index of the enchanting option
      bookshelfCount - the number of bookshelves
      stack - the item stack to enchant
      Returns:
      the required experience level for an enchanting option in the enchanting table's screen, or the enchantment screen
      Mappings:
      Namespace Name Mixin selector
      named calculateRequiredExperienceLevel Lnet/minecraft/enchantment/EnchantmentHelper;calculateRequiredExperienceLevel(Lnet/minecraft/util/math/random/Random;IILnet/minecraft/item/ItemStack;)I
      intermediary method_8227 Lnet/minecraft/class_1890;method_8227(Lnet/minecraft/class_5819;IILnet/minecraft/class_1799;)I
      official a Ldae;a(Layw;IILcuq;)I
    • enchant

      public static ItemStack enchant(Random random, ItemStack stack, int level, DynamicRegistryManager dynamicRegistryManager, Optional<? extends RegistryEntryList<Enchantment>> enchantments)
      Mappings:
      Namespace Name Mixin selector
      named enchant Lnet/minecraft/enchantment/EnchantmentHelper;enchant(Lnet/minecraft/util/math/random/Random;Lnet/minecraft/item/ItemStack;ILnet/minecraft/registry/DynamicRegistryManager;Ljava/util/Optional;)Lnet/minecraft/item/ItemStack;
      intermediary method_60133 Lnet/minecraft/class_1890;method_60133(Lnet/minecraft/class_5819;Lnet/minecraft/class_1799;ILnet/minecraft/class_5455;Ljava/util/Optional;)Lnet/minecraft/class_1799;
      official a Ldae;a(Layw;Lcuq;ILka;Ljava/util/Optional;)Lcuq;
    • enchant

      public static ItemStack enchant(Random random, ItemStack stack, int level, Stream<RegistryEntry<Enchantment>> possibleEnchantments)
      Enchants the target item stack and returns it.
      Mappings:
      Namespace Name Mixin selector
      named enchant Lnet/minecraft/enchantment/EnchantmentHelper;enchant(Lnet/minecraft/util/math/random/Random;Lnet/minecraft/item/ItemStack;ILjava/util/stream/Stream;)Lnet/minecraft/item/ItemStack;
      intermediary method_8233 Lnet/minecraft/class_1890;method_8233(Lnet/minecraft/class_5819;Lnet/minecraft/class_1799;ILjava/util/stream/Stream;)Lnet/minecraft/class_1799;
      official a Ldae;a(Layw;Lcuq;ILjava/util/stream/Stream;)Lcuq;
    • generateEnchantments

      public static List<EnchantmentLevelEntry> generateEnchantments(Random random, ItemStack stack, int level, Stream<RegistryEntry<Enchantment>> possibleEnchantments)
      Generate the enchantments for enchanting the stack.
      Mappings:
      Namespace Name Mixin selector
      named generateEnchantments Lnet/minecraft/enchantment/EnchantmentHelper;generateEnchantments(Lnet/minecraft/util/math/random/Random;Lnet/minecraft/item/ItemStack;ILjava/util/stream/Stream;)Ljava/util/List;
      intermediary method_8230 Lnet/minecraft/class_1890;method_8230(Lnet/minecraft/class_5819;Lnet/minecraft/class_1799;ILjava/util/stream/Stream;)Ljava/util/List;
      official b Ldae;b(Layw;Lcuq;ILjava/util/stream/Stream;)Ljava/util/List;
    • removeConflicts

      public static void removeConflicts(List<EnchantmentLevelEntry> possibleEntries, EnchantmentLevelEntry pickedEntry)
      Remove entries conflicting with the picked entry from the possible entries.
      Parameters:
      possibleEntries - the possible entries
      pickedEntry - the picked entry
      Mappings:
      Namespace Name Mixin selector
      named removeConflicts Lnet/minecraft/enchantment/EnchantmentHelper;removeConflicts(Ljava/util/List;Lnet/minecraft/enchantment/EnchantmentLevelEntry;)V
      intermediary method_8231 Lnet/minecraft/class_1890;method_8231(Ljava/util/List;Lnet/minecraft/class_1889;)V
      official a Ldae;a(Ljava/util/List;Ldaf;)V
    • isCompatible

      public static boolean isCompatible(Collection<RegistryEntry<Enchantment>> existing, RegistryEntry<Enchantment> candidate)
      Returns whether the candidate enchantment is compatible with the existing enchantments.
      Returns:
      whether the candidate enchantment is compatible with the existing enchantments
      Mappings:
      Namespace Name Mixin selector
      named isCompatible Lnet/minecraft/enchantment/EnchantmentHelper;isCompatible(Ljava/util/Collection;Lnet/minecraft/registry/entry/RegistryEntry;)Z
      intermediary method_8201 Lnet/minecraft/class_1890;method_8201(Ljava/util/Collection;Lnet/minecraft/class_6880;)Z
      official a Ldae;a(Ljava/util/Collection;Ljm;)Z
    • getPossibleEntries

      public static List<EnchantmentLevelEntry> getPossibleEntries(int level, ItemStack stack, Stream<RegistryEntry<Enchantment>> possibleEnchantments)
      Gets all the possible entries for enchanting the stack at the given power.
      Mappings:
      Namespace Name Mixin selector
      named getPossibleEntries Lnet/minecraft/enchantment/EnchantmentHelper;getPossibleEntries(ILnet/minecraft/item/ItemStack;Ljava/util/stream/Stream;)Ljava/util/List;
      intermediary method_8229 Lnet/minecraft/class_1890;method_8229(ILnet/minecraft/class_1799;Ljava/util/stream/Stream;)Ljava/util/List;
      official a Ldae;a(ILcuq;Ljava/util/stream/Stream;)Ljava/util/List;
    • applyEnchantmentProvider

      public static void applyEnchantmentProvider(ItemStack stack, DynamicRegistryManager registryManager, RegistryKey<EnchantmentProvider> providerKey, LocalDifficulty localDifficulty, Random random)
      Mappings:
      Namespace Name Mixin selector
      named applyEnchantmentProvider Lnet/minecraft/enchantment/EnchantmentHelper;applyEnchantmentProvider(Lnet/minecraft/item/ItemStack;Lnet/minecraft/registry/DynamicRegistryManager;Lnet/minecraft/registry/RegistryKey;Lnet/minecraft/world/LocalDifficulty;Lnet/minecraft/util/math/random/Random;)V
      intermediary method_60137 Lnet/minecraft/class_1890;method_60137(Lnet/minecraft/class_1799;Lnet/minecraft/class_5455;Lnet/minecraft/class_5321;Lnet/minecraft/class_1266;Lnet/minecraft/class_5819;)V
      official a Ldae;a(Lcuq;Lka;Lakq;Lbqp;Layw;)V