Record Class Enchantment

java.lang.Object
java.lang.Record
net.minecraft.enchantment.Enchantment
Record Components:
description -
definition -
exclusiveSet -
effects -

public record Enchantment(Text description, Enchantment.Definition definition, RegistryEntryList<Enchantment> exclusiveSet, ComponentMap effects) extends Record
Mappings:
Namespace Name
named net/minecraft/enchantment/Enchantment
intermediary net/minecraft/class_1887
official ddy
named description
intermediary comp_2686
official e
named definition
intermediary comp_2687
official f
named exclusiveSet
intermediary comp_2688
official g
named effects
intermediary comp_2689
official h
  • Field Details

    • description

      private final Text description
      The field for the description record component.
    • definition

      private final Enchantment.Definition definition
      The field for the definition record component.
    • exclusiveSet

      private final RegistryEntryList<Enchantment> exclusiveSet
      The field for the exclusiveSet record component.
    • effects

      private final ComponentMap effects
      The field for the effects record component.
    • MAX_LEVEL

      public static final int MAX_LEVEL
      See Also:
      Mappings:
      Namespace Name Mixin selector
      named MAX_LEVEL Lnet/minecraft/enchantment/Enchantment;MAX_LEVEL:I
      intermediary field_51949 Lnet/minecraft/class_1887;field_51949:I
      official a Lddy;a:I
    • CODEC

      public static final com.mojang.serialization.Codec<Enchantment> CODEC
      Mappings:
      Namespace Name Mixin selector
      named CODEC Lnet/minecraft/enchantment/Enchantment;CODEC:Lcom/mojang/serialization/Codec;
      intermediary field_51643 Lnet/minecraft/class_1887;field_51643:Lcom/mojang/serialization/Codec;
      official b Lddy;b:Lcom/mojang/serialization/Codec;
    • ENTRY_CODEC

      public static final com.mojang.serialization.Codec<RegistryEntry<Enchantment>> ENTRY_CODEC
      Mappings:
      Namespace Name Mixin selector
      named ENTRY_CODEC Lnet/minecraft/enchantment/Enchantment;ENTRY_CODEC:Lcom/mojang/serialization/Codec;
      intermediary field_51644 Lnet/minecraft/class_1887;field_51644:Lcom/mojang/serialization/Codec;
      official c Lddy;c:Lcom/mojang/serialization/Codec;
    • ENTRY_PACKET_CODEC

      public static final PacketCodec<RegistryByteBuf,RegistryEntry<Enchantment>> ENTRY_PACKET_CODEC
      Mappings:
      Namespace Name Mixin selector
      named ENTRY_PACKET_CODEC Lnet/minecraft/enchantment/Enchantment;ENTRY_PACKET_CODEC:Lnet/minecraft/network/codec/PacketCodec;
      intermediary field_51950 Lnet/minecraft/class_1887;field_51950:Lnet/minecraft/class_9139;
      official d Lddy;d:Lzt;
  • Constructor Details

  • Method Details

    • constantCost

      public static Enchantment.Cost constantCost(int base)
      Mappings:
      Namespace Name Mixin selector
      named constantCost Lnet/minecraft/enchantment/Enchantment;constantCost(I)Lnet/minecraft/enchantment/Enchantment$Cost;
      intermediary method_58440 Lnet/minecraft/class_1887;method_58440(I)Lnet/minecraft/class_1887$class_9426;
      official a Lddy;a(I)Lddy$b;
    • leveledCost

      public static Enchantment.Cost leveledCost(int base, int perLevel)
      Mappings:
      Namespace Name Mixin selector
      named leveledCost Lnet/minecraft/enchantment/Enchantment;leveledCost(II)Lnet/minecraft/enchantment/Enchantment$Cost;
      intermediary method_58441 Lnet/minecraft/class_1887;method_58441(II)Lnet/minecraft/class_1887$class_9426;
      official a Lddy;a(II)Lddy$b;
    • definition

      public static Enchantment.Definition definition(RegistryEntryList<Item> supportedItems, RegistryEntryList<Item> primaryItems, int weight, int maxLevel, Enchantment.Cost minCost, Enchantment.Cost maxCost, int anvilCost, AttributeModifierSlot[] slots)
      Mappings:
      Namespace Name Mixin selector
      named definition Lnet/minecraft/enchantment/Enchantment;definition(Lnet/minecraft/registry/entry/RegistryEntryList;Lnet/minecraft/registry/entry/RegistryEntryList;IILnet/minecraft/enchantment/Enchantment$Cost;Lnet/minecraft/enchantment/Enchantment$Cost;I[Lnet/minecraft/component/type/AttributeModifierSlot;)Lnet/minecraft/enchantment/Enchantment$Definition;
      intermediary method_58443 Lnet/minecraft/class_1887;method_58443(Lnet/minecraft/class_6885;Lnet/minecraft/class_6885;IILnet/minecraft/class_1887$class_9426;Lnet/minecraft/class_1887$class_9426;I[Lnet/minecraft/class_9274;)Lnet/minecraft/class_1887$class_9427;
      official a Lddy;a(Lju;Lju;IILddy$b;Lddy$b;I[Lbvs;)Lddy$c;
    • definition

      public static Enchantment.Definition definition(RegistryEntryList<Item> supportedItems, int weight, int maxLevel, Enchantment.Cost minCost, Enchantment.Cost maxCost, int anvilCost, AttributeModifierSlot[] slots)
      Mappings:
      Namespace Name Mixin selector
      named definition Lnet/minecraft/enchantment/Enchantment;definition(Lnet/minecraft/registry/entry/RegistryEntryList;IILnet/minecraft/enchantment/Enchantment$Cost;Lnet/minecraft/enchantment/Enchantment$Cost;I[Lnet/minecraft/component/type/AttributeModifierSlot;)Lnet/minecraft/enchantment/Enchantment$Definition;
      intermediary method_58442 Lnet/minecraft/class_1887;method_58442(Lnet/minecraft/class_6885;IILnet/minecraft/class_1887$class_9426;Lnet/minecraft/class_1887$class_9426;I[Lnet/minecraft/class_9274;)Lnet/minecraft/class_1887$class_9427;
      official a Lddy;a(Lju;IILddy$b;Lddy$b;I[Lbvs;)Lddy$c;
    • getEquipment

      public Map<EquipmentSlot,ItemStack> getEquipment(LivingEntity entity)
      Mappings:
      Namespace Name Mixin selector
      named getEquipment Lnet/minecraft/enchantment/Enchantment;getEquipment(Lnet/minecraft/entity/LivingEntity;)Ljava/util/Map;
      intermediary method_8185 Lnet/minecraft/class_1887;method_8185(Lnet/minecraft/class_1309;)Ljava/util/Map;
      official a Lddy;a(Lbwf;)Ljava/util/Map;
    • getApplicableItems

      public RegistryEntryList<Item> getApplicableItems()
      Mappings:
      Namespace Name Mixin selector
      named getApplicableItems Lnet/minecraft/enchantment/Enchantment;getApplicableItems()Lnet/minecraft/registry/entry/RegistryEntryList;
      intermediary method_56109 Lnet/minecraft/class_1887;method_56109()Lnet/minecraft/class_6885;
      official a Lddy;a()Lju;
    • slotMatches

      public boolean slotMatches(EquipmentSlot slot)
      Mappings:
      Namespace Name Mixin selector
      named slotMatches Lnet/minecraft/enchantment/Enchantment;slotMatches(Lnet/minecraft/entity/EquipmentSlot;)Z
      intermediary method_60026 Lnet/minecraft/class_1887;method_60026(Lnet/minecraft/class_1304;)Z
      official a Lddy;a(Lbvr;)Z
    • isPrimaryItem

      public boolean isPrimaryItem(ItemStack stack)
      Mappings:
      Namespace Name Mixin selector
      named isPrimaryItem Lnet/minecraft/enchantment/Enchantment;isPrimaryItem(Lnet/minecraft/item/ItemStack;)Z
      intermediary method_58444 Lnet/minecraft/class_1887;method_58444(Lnet/minecraft/class_1799;)Z
      official a Lddy;a(Lcxo;)Z
    • isSupportedItem

      public boolean isSupportedItem(ItemStack stack)
      Mappings:
      Namespace Name Mixin selector
      named isSupportedItem Lnet/minecraft/enchantment/Enchantment;isSupportedItem(Lnet/minecraft/item/ItemStack;)Z
      intermediary method_60046 Lnet/minecraft/class_1887;method_60046(Lnet/minecraft/class_1799;)Z
      official b Lddy;b(Lcxo;)Z
    • getWeight

      public int getWeight()
      Mappings:
      Namespace Name Mixin selector
      named getWeight Lnet/minecraft/enchantment/Enchantment;getWeight()I
      intermediary method_58445 Lnet/minecraft/class_1887;method_58445()I
      official b Lddy;b()I
    • getAnvilCost

      public int getAnvilCost()
      Mappings:
      Namespace Name Mixin selector
      named getAnvilCost Lnet/minecraft/enchantment/Enchantment;getAnvilCost()I
      intermediary method_58446 Lnet/minecraft/class_1887;method_58446()I
      official c Lddy;c()I
    • getMinLevel

      public int getMinLevel()
      Mappings:
      Namespace Name Mixin selector
      named getMinLevel Lnet/minecraft/enchantment/Enchantment;getMinLevel()I
      intermediary method_8187 Lnet/minecraft/class_1887;method_8187()I
      official d Lddy;d()I
    • getMaxLevel

      public int getMaxLevel()
      Mappings:
      Namespace Name Mixin selector
      named getMaxLevel Lnet/minecraft/enchantment/Enchantment;getMaxLevel()I
      intermediary method_8183 Lnet/minecraft/class_1887;method_8183()I
      official e Lddy;e()I
    • getMinPower

      public int getMinPower(int level)
      Mappings:
      Namespace Name Mixin selector
      named getMinPower Lnet/minecraft/enchantment/Enchantment;getMinPower(I)I
      intermediary method_8182 Lnet/minecraft/class_1887;method_8182(I)I
      official b Lddy;b(I)I
    • getMaxPower

      public int getMaxPower(int level)
      Mappings:
      Namespace Name Mixin selector
      named getMaxPower Lnet/minecraft/enchantment/Enchantment;getMaxPower(I)I
      intermediary method_20742 Lnet/minecraft/class_1887;method_20742(I)I
      official c Lddy;c(I)I
    • toString

      public String toString()
      Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components.
      Specified by:
      toString in class Record
      Returns:
      a string representation of this object
    • canBeCombined

      public static boolean canBeCombined(RegistryEntry<Enchantment> first, RegistryEntry<Enchantment> second)
      Mappings:
      Namespace Name Mixin selector
      named canBeCombined Lnet/minecraft/enchantment/Enchantment;canBeCombined(Lnet/minecraft/registry/entry/RegistryEntry;Lnet/minecraft/registry/entry/RegistryEntry;)Z
      intermediary method_60033 Lnet/minecraft/class_1887;method_60033(Lnet/minecraft/class_6880;Lnet/minecraft/class_6880;)Z
      official a Lddy;a(Ljq;Ljq;)Z
    • getName

      public static Text getName(RegistryEntry<Enchantment> enchantment, int level)
      Mappings:
      Namespace Name Mixin selector
      named getName Lnet/minecraft/enchantment/Enchantment;getName(Lnet/minecraft/registry/entry/RegistryEntry;I)Lnet/minecraft/text/Text;
      intermediary method_8179 Lnet/minecraft/class_1887;method_8179(Lnet/minecraft/class_6880;I)Lnet/minecraft/class_2561;
      official a Lddy;a(Ljq;I)Lxv;
    • isAcceptableItem

      public boolean isAcceptableItem(ItemStack stack)
      Mappings:
      Namespace Name Mixin selector
      named isAcceptableItem Lnet/minecraft/enchantment/Enchantment;isAcceptableItem(Lnet/minecraft/item/ItemStack;)Z
      intermediary method_8192 Lnet/minecraft/class_1887;method_8192(Lnet/minecraft/class_1799;)Z
      official c Lddy;c(Lcxo;)Z
    • getEffect

      public <T> List<T> getEffect(ComponentType<List<T>> type)
      Mappings:
      Namespace Name Mixin selector
      named getEffect Lnet/minecraft/enchantment/Enchantment;getEffect(Lnet/minecraft/component/ComponentType;)Ljava/util/List;
      intermediary method_60034 Lnet/minecraft/class_1887;method_60034(Lnet/minecraft/class_9331;)Ljava/util/List;
      official a Lddy;a(Lkt;)Ljava/util/List;
    • hasDamageImmunityTo

      public boolean hasDamageImmunityTo(ServerWorld world, int level, Entity user, DamageSource damageSource)
      Mappings:
      Namespace Name Mixin selector
      named hasDamageImmunityTo Lnet/minecraft/enchantment/Enchantment;hasDamageImmunityTo(Lnet/minecraft/server/world/ServerWorld;ILnet/minecraft/entity/Entity;Lnet/minecraft/entity/damage/DamageSource;)Z
      intermediary method_60014 Lnet/minecraft/class_1887;method_60014(Lnet/minecraft/class_3218;ILnet/minecraft/class_1297;Lnet/minecraft/class_1282;)Z
      official a Lddy;a(Lash;ILbvj;Lbtz;)Z
    • modifyDamageProtection

      public void modifyDamageProtection(ServerWorld world, int level, ItemStack stack, Entity user, DamageSource damageSource, MutableFloat damageProtection)
      Mappings:
      Namespace Name Mixin selector
      named modifyDamageProtection Lnet/minecraft/enchantment/Enchantment;modifyDamageProtection(Lnet/minecraft/server/world/ServerWorld;ILnet/minecraft/item/ItemStack;Lnet/minecraft/entity/Entity;Lnet/minecraft/entity/damage/DamageSource;Lorg/apache/commons/lang3/mutable/MutableFloat;)V
      intermediary method_60018 Lnet/minecraft/class_1887;method_60018(Lnet/minecraft/class_3218;ILnet/minecraft/class_1799;Lnet/minecraft/class_1297;Lnet/minecraft/class_1282;Lorg/apache/commons/lang3/mutable/MutableFloat;)V
      official a Lddy;a(Lash;ILcxo;Lbvj;Lbtz;Lorg/apache/commons/lang3/mutable/MutableFloat;)V
    • modifyItemDamage

      public void modifyItemDamage(ServerWorld world, int level, ItemStack stack, MutableFloat itemDamage)
      Mappings:
      Namespace Name Mixin selector
      named modifyItemDamage Lnet/minecraft/enchantment/Enchantment;modifyItemDamage(Lnet/minecraft/server/world/ServerWorld;ILnet/minecraft/item/ItemStack;Lorg/apache/commons/lang3/mutable/MutableFloat;)V
      intermediary method_60020 Lnet/minecraft/class_1887;method_60020(Lnet/minecraft/class_3218;ILnet/minecraft/class_1799;Lorg/apache/commons/lang3/mutable/MutableFloat;)V
      official a Lddy;a(Lash;ILcxo;Lorg/apache/commons/lang3/mutable/MutableFloat;)V
    • modifyAmmoUse

      public void modifyAmmoUse(ServerWorld world, int level, ItemStack projectileStack, MutableFloat ammoUse)
      Mappings:
      Namespace Name Mixin selector
      named modifyAmmoUse Lnet/minecraft/enchantment/Enchantment;modifyAmmoUse(Lnet/minecraft/server/world/ServerWorld;ILnet/minecraft/item/ItemStack;Lorg/apache/commons/lang3/mutable/MutableFloat;)V
      intermediary method_60043 Lnet/minecraft/class_1887;method_60043(Lnet/minecraft/class_3218;ILnet/minecraft/class_1799;Lorg/apache/commons/lang3/mutable/MutableFloat;)V
      official b Lddy;b(Lash;ILcxo;Lorg/apache/commons/lang3/mutable/MutableFloat;)V
    • modifyProjectilePiercing

      public void modifyProjectilePiercing(ServerWorld world, int level, ItemStack stack, MutableFloat projectilePiercing)
      Mappings:
      Namespace Name Mixin selector
      named modifyProjectilePiercing Lnet/minecraft/enchantment/Enchantment;modifyProjectilePiercing(Lnet/minecraft/server/world/ServerWorld;ILnet/minecraft/item/ItemStack;Lorg/apache/commons/lang3/mutable/MutableFloat;)V
      intermediary method_60050 Lnet/minecraft/class_1887;method_60050(Lnet/minecraft/class_3218;ILnet/minecraft/class_1799;Lorg/apache/commons/lang3/mutable/MutableFloat;)V
      official c Lddy;c(Lash;ILcxo;Lorg/apache/commons/lang3/mutable/MutableFloat;)V
    • modifyBlockExperience

      public void modifyBlockExperience(ServerWorld world, int level, ItemStack stack, MutableFloat blockExperience)
      Mappings:
      Namespace Name Mixin selector
      named modifyBlockExperience Lnet/minecraft/enchantment/Enchantment;modifyBlockExperience(Lnet/minecraft/server/world/ServerWorld;ILnet/minecraft/item/ItemStack;Lorg/apache/commons/lang3/mutable/MutableFloat;)V
      intermediary method_60053 Lnet/minecraft/class_1887;method_60053(Lnet/minecraft/class_3218;ILnet/minecraft/class_1799;Lorg/apache/commons/lang3/mutable/MutableFloat;)V
      official d Lddy;d(Lash;ILcxo;Lorg/apache/commons/lang3/mutable/MutableFloat;)V
    • modifyMobExperience

      public void modifyMobExperience(ServerWorld world, int level, ItemStack stack, Entity user, MutableFloat mobExperience)
      Mappings:
      Namespace Name Mixin selector
      named modifyMobExperience Lnet/minecraft/enchantment/Enchantment;modifyMobExperience(Lnet/minecraft/server/world/ServerWorld;ILnet/minecraft/item/ItemStack;Lnet/minecraft/entity/Entity;Lorg/apache/commons/lang3/mutable/MutableFloat;)V
      intermediary method_60019 Lnet/minecraft/class_1887;method_60019(Lnet/minecraft/class_3218;ILnet/minecraft/class_1799;Lnet/minecraft/class_1297;Lorg/apache/commons/lang3/mutable/MutableFloat;)V
      official a Lddy;a(Lash;ILcxo;Lbvj;Lorg/apache/commons/lang3/mutable/MutableFloat;)V
    • modifyRepairWithXp

      public void modifyRepairWithXp(ServerWorld world, int level, ItemStack stack, MutableFloat repairWithXp)
      Mappings:
      Namespace Name Mixin selector
      named modifyRepairWithXp Lnet/minecraft/enchantment/Enchantment;modifyRepairWithXp(Lnet/minecraft/server/world/ServerWorld;ILnet/minecraft/item/ItemStack;Lorg/apache/commons/lang3/mutable/MutableFloat;)V
      intermediary method_60056 Lnet/minecraft/class_1887;method_60056(Lnet/minecraft/class_3218;ILnet/minecraft/class_1799;Lorg/apache/commons/lang3/mutable/MutableFloat;)V
      official e Lddy;e(Lash;ILcxo;Lorg/apache/commons/lang3/mutable/MutableFloat;)V
    • modifyTridentReturnAcceleration

      public void modifyTridentReturnAcceleration(ServerWorld world, int level, ItemStack stack, Entity user, MutableFloat tridentReturnAcceleration)
      Mappings:
      Namespace Name Mixin selector
      named modifyTridentReturnAcceleration Lnet/minecraft/enchantment/Enchantment;modifyTridentReturnAcceleration(Lnet/minecraft/server/world/ServerWorld;ILnet/minecraft/item/ItemStack;Lnet/minecraft/entity/Entity;Lorg/apache/commons/lang3/mutable/MutableFloat;)V
      intermediary method_60042 Lnet/minecraft/class_1887;method_60042(Lnet/minecraft/class_3218;ILnet/minecraft/class_1799;Lnet/minecraft/class_1297;Lorg/apache/commons/lang3/mutable/MutableFloat;)V
      official b Lddy;b(Lash;ILcxo;Lbvj;Lorg/apache/commons/lang3/mutable/MutableFloat;)V
    • modifyTridentSpinAttackStrength

      public void modifyTridentSpinAttackStrength(Random random, int level, MutableFloat tridentSpinAttackStrength)
      Mappings:
      Namespace Name Mixin selector
      named modifyTridentSpinAttackStrength Lnet/minecraft/enchantment/Enchantment;modifyTridentSpinAttackStrength(Lnet/minecraft/util/math/random/Random;ILorg/apache/commons/lang3/mutable/MutableFloat;)V
      intermediary method_60049 Lnet/minecraft/class_1887;method_60049(Lnet/minecraft/class_5819;ILorg/apache/commons/lang3/mutable/MutableFloat;)V
      official a Lddy;a(Lbam;ILorg/apache/commons/lang3/mutable/MutableFloat;)V
    • modifyFishingTimeReduction

      public void modifyFishingTimeReduction(ServerWorld world, int level, ItemStack stack, Entity user, MutableFloat fishingTimeReduction)
      Mappings:
      Namespace Name Mixin selector
      named modifyFishingTimeReduction Lnet/minecraft/enchantment/Enchantment;modifyFishingTimeReduction(Lnet/minecraft/server/world/ServerWorld;ILnet/minecraft/item/ItemStack;Lnet/minecraft/entity/Entity;Lorg/apache/commons/lang3/mutable/MutableFloat;)V
      intermediary method_60052 Lnet/minecraft/class_1887;method_60052(Lnet/minecraft/class_3218;ILnet/minecraft/class_1799;Lnet/minecraft/class_1297;Lorg/apache/commons/lang3/mutable/MutableFloat;)V
      official c Lddy;c(Lash;ILcxo;Lbvj;Lorg/apache/commons/lang3/mutable/MutableFloat;)V
    • modifyFishingLuckBonus

      public void modifyFishingLuckBonus(ServerWorld world, int level, ItemStack stack, Entity user, MutableFloat fishingLuckBonus)
      Mappings:
      Namespace Name Mixin selector
      named modifyFishingLuckBonus Lnet/minecraft/enchantment/Enchantment;modifyFishingLuckBonus(Lnet/minecraft/server/world/ServerWorld;ILnet/minecraft/item/ItemStack;Lnet/minecraft/entity/Entity;Lorg/apache/commons/lang3/mutable/MutableFloat;)V
      intermediary method_60055 Lnet/minecraft/class_1887;method_60055(Lnet/minecraft/class_3218;ILnet/minecraft/class_1799;Lnet/minecraft/class_1297;Lorg/apache/commons/lang3/mutable/MutableFloat;)V
      official d Lddy;d(Lash;ILcxo;Lbvj;Lorg/apache/commons/lang3/mutable/MutableFloat;)V
    • modifyDamage

      public void modifyDamage(ServerWorld world, int level, ItemStack stack, Entity user, DamageSource damageSource, MutableFloat damage)
      Mappings:
      Namespace Name Mixin selector
      named modifyDamage Lnet/minecraft/enchantment/Enchantment;modifyDamage(Lnet/minecraft/server/world/ServerWorld;ILnet/minecraft/item/ItemStack;Lnet/minecraft/entity/Entity;Lnet/minecraft/entity/damage/DamageSource;Lorg/apache/commons/lang3/mutable/MutableFloat;)V
      intermediary method_60041 Lnet/minecraft/class_1887;method_60041(Lnet/minecraft/class_3218;ILnet/minecraft/class_1799;Lnet/minecraft/class_1297;Lnet/minecraft/class_1282;Lorg/apache/commons/lang3/mutable/MutableFloat;)V
      official b Lddy;b(Lash;ILcxo;Lbvj;Lbtz;Lorg/apache/commons/lang3/mutable/MutableFloat;)V
    • modifySmashDamagePerFallenBlock

      public void modifySmashDamagePerFallenBlock(ServerWorld world, int level, ItemStack stack, Entity user, DamageSource damageSource, MutableFloat smashDamagePerFallenBlock)
      Mappings:
      Namespace Name Mixin selector
      named modifySmashDamagePerFallenBlock Lnet/minecraft/enchantment/Enchantment;modifySmashDamagePerFallenBlock(Lnet/minecraft/server/world/ServerWorld;ILnet/minecraft/item/ItemStack;Lnet/minecraft/entity/Entity;Lnet/minecraft/entity/damage/DamageSource;Lorg/apache/commons/lang3/mutable/MutableFloat;)V
      intermediary method_60048 Lnet/minecraft/class_1887;method_60048(Lnet/minecraft/class_3218;ILnet/minecraft/class_1799;Lnet/minecraft/class_1297;Lnet/minecraft/class_1282;Lorg/apache/commons/lang3/mutable/MutableFloat;)V
      official c Lddy;c(Lash;ILcxo;Lbvj;Lbtz;Lorg/apache/commons/lang3/mutable/MutableFloat;)V
    • modifyKnockback

      public void modifyKnockback(ServerWorld world, int level, ItemStack stack, Entity user, DamageSource damageSource, MutableFloat knockback)
      Mappings:
      Namespace Name Mixin selector
      named modifyKnockback Lnet/minecraft/enchantment/Enchantment;modifyKnockback(Lnet/minecraft/server/world/ServerWorld;ILnet/minecraft/item/ItemStack;Lnet/minecraft/entity/Entity;Lnet/minecraft/entity/damage/DamageSource;Lorg/apache/commons/lang3/mutable/MutableFloat;)V
      intermediary method_60051 Lnet/minecraft/class_1887;method_60051(Lnet/minecraft/class_3218;ILnet/minecraft/class_1799;Lnet/minecraft/class_1297;Lnet/minecraft/class_1282;Lorg/apache/commons/lang3/mutable/MutableFloat;)V
      official d Lddy;d(Lash;ILcxo;Lbvj;Lbtz;Lorg/apache/commons/lang3/mutable/MutableFloat;)V
    • modifyArmorEffectiveness

      public void modifyArmorEffectiveness(ServerWorld world, int level, ItemStack stack, Entity user, DamageSource damageSource, MutableFloat armorEffectiveness)
      Mappings:
      Namespace Name Mixin selector
      named modifyArmorEffectiveness Lnet/minecraft/enchantment/Enchantment;modifyArmorEffectiveness(Lnet/minecraft/server/world/ServerWorld;ILnet/minecraft/item/ItemStack;Lnet/minecraft/entity/Entity;Lnet/minecraft/entity/damage/DamageSource;Lorg/apache/commons/lang3/mutable/MutableFloat;)V
      intermediary method_60054 Lnet/minecraft/class_1887;method_60054(Lnet/minecraft/class_3218;ILnet/minecraft/class_1799;Lnet/minecraft/class_1297;Lnet/minecraft/class_1282;Lorg/apache/commons/lang3/mutable/MutableFloat;)V
      official e Lddy;e(Lash;ILcxo;Lbvj;Lbtz;Lorg/apache/commons/lang3/mutable/MutableFloat;)V
    • onTargetDamaged

      public void onTargetDamaged(ServerWorld world, int level, EnchantmentEffectContext context, EnchantmentEffectTarget target, Entity user, DamageSource damageSource)
      Mappings:
      Namespace Name Mixin selector
      named onTargetDamaged Lnet/minecraft/enchantment/Enchantment;onTargetDamaged(Lnet/minecraft/server/world/ServerWorld;ILnet/minecraft/enchantment/EnchantmentEffectContext;Lnet/minecraft/enchantment/effect/EnchantmentEffectTarget;Lnet/minecraft/entity/Entity;Lnet/minecraft/entity/damage/DamageSource;)V
      intermediary method_8189 Lnet/minecraft/class_1887;method_8189(Lnet/minecraft/class_3218;ILnet/minecraft/class_9699;Lnet/minecraft/class_9703;Lnet/minecraft/class_1297;Lnet/minecraft/class_1282;)V
      official a Lddy;a(Lash;ILddx;Ldec;Lbvj;Lbtz;)V
    • applyTargetedEffect

      public static void applyTargetedEffect(TargetedEnchantmentEffect<EnchantmentEntityEffect> effect, ServerWorld world, int level, EnchantmentEffectContext context, Entity user, DamageSource damageSource)
      Mappings:
      Namespace Name Mixin selector
      named applyTargetedEffect Lnet/minecraft/enchantment/Enchantment;applyTargetedEffect(Lnet/minecraft/enchantment/effect/TargetedEnchantmentEffect;Lnet/minecraft/server/world/ServerWorld;ILnet/minecraft/enchantment/EnchantmentEffectContext;Lnet/minecraft/entity/Entity;Lnet/minecraft/entity/damage/DamageSource;)V
      intermediary method_60031 Lnet/minecraft/class_1887;method_60031(Lnet/minecraft/class_9710;Lnet/minecraft/class_3218;ILnet/minecraft/class_9699;Lnet/minecraft/class_1297;Lnet/minecraft/class_1282;)V
      official a Lddy;a(Ldeh;Lash;ILddx;Lbvj;Lbtz;)V
    • modifyProjectileCount

      public void modifyProjectileCount(ServerWorld world, int level, ItemStack stack, Entity user, MutableFloat projectileCount)
      Mappings:
      Namespace Name Mixin selector
      named modifyProjectileCount Lnet/minecraft/enchantment/Enchantment;modifyProjectileCount(Lnet/minecraft/server/world/ServerWorld;ILnet/minecraft/item/ItemStack;Lnet/minecraft/entity/Entity;Lorg/apache/commons/lang3/mutable/MutableFloat;)V
      intermediary method_60057 Lnet/minecraft/class_1887;method_60057(Lnet/minecraft/class_3218;ILnet/minecraft/class_1799;Lnet/minecraft/class_1297;Lorg/apache/commons/lang3/mutable/MutableFloat;)V
      official e Lddy;e(Lash;ILcxo;Lbvj;Lorg/apache/commons/lang3/mutable/MutableFloat;)V
    • modifyProjectileSpread

      public void modifyProjectileSpread(ServerWorld world, int level, ItemStack stack, Entity user, MutableFloat projectileSpread)
      Mappings:
      Namespace Name Mixin selector
      named modifyProjectileSpread Lnet/minecraft/enchantment/Enchantment;modifyProjectileSpread(Lnet/minecraft/server/world/ServerWorld;ILnet/minecraft/item/ItemStack;Lnet/minecraft/entity/Entity;Lorg/apache/commons/lang3/mutable/MutableFloat;)V
      intermediary method_60059 Lnet/minecraft/class_1887;method_60059(Lnet/minecraft/class_3218;ILnet/minecraft/class_1799;Lnet/minecraft/class_1297;Lorg/apache/commons/lang3/mutable/MutableFloat;)V
      official f Lddy;f(Lash;ILcxo;Lbvj;Lorg/apache/commons/lang3/mutable/MutableFloat;)V
    • modifyCrossbowChargeTime

      public void modifyCrossbowChargeTime(Random random, int level, MutableFloat crossbowChargeTime)
      Mappings:
      Namespace Name Mixin selector
      named modifyCrossbowChargeTime Lnet/minecraft/enchantment/Enchantment;modifyCrossbowChargeTime(Lnet/minecraft/util/math/random/Random;ILorg/apache/commons/lang3/mutable/MutableFloat;)V
      intermediary method_60058 Lnet/minecraft/class_1887;method_60058(Lnet/minecraft/class_5819;ILorg/apache/commons/lang3/mutable/MutableFloat;)V
      official b Lddy;b(Lbam;ILorg/apache/commons/lang3/mutable/MutableFloat;)V
    • modifyValue

      public void modifyValue(ComponentType<EnchantmentValueEffect> type, Random random, int level, MutableFloat value)
      Mappings:
      Namespace Name Mixin selector
      named modifyValue Lnet/minecraft/enchantment/Enchantment;modifyValue(Lnet/minecraft/component/ComponentType;Lnet/minecraft/util/math/random/Random;ILorg/apache/commons/lang3/mutable/MutableFloat;)V
      intermediary method_60506 Lnet/minecraft/class_1887;method_60506(Lnet/minecraft/class_9331;Lnet/minecraft/class_5819;ILorg/apache/commons/lang3/mutable/MutableFloat;)V
      official a Lddy;a(Lkt;Lbam;ILorg/apache/commons/lang3/mutable/MutableFloat;)V
    • onTick

      public void onTick(ServerWorld world, int level, EnchantmentEffectContext context, Entity user)
      Mappings:
      Namespace Name Mixin selector
      named onTick Lnet/minecraft/enchantment/Enchantment;onTick(Lnet/minecraft/server/world/ServerWorld;ILnet/minecraft/enchantment/EnchantmentEffectContext;Lnet/minecraft/entity/Entity;)V
      intermediary method_60021 Lnet/minecraft/class_1887;method_60021(Lnet/minecraft/class_3218;ILnet/minecraft/class_9699;Lnet/minecraft/class_1297;)V
      official a Lddy;a(Lash;ILddx;Lbvj;)V
    • onProjectileSpawned

      public void onProjectileSpawned(ServerWorld world, int level, EnchantmentEffectContext context, Entity user)
      Mappings:
      Namespace Name Mixin selector
      named onProjectileSpawned Lnet/minecraft/enchantment/Enchantment;onProjectileSpawned(Lnet/minecraft/server/world/ServerWorld;ILnet/minecraft/enchantment/EnchantmentEffectContext;Lnet/minecraft/entity/Entity;)V
      intermediary method_60044 Lnet/minecraft/class_1887;method_60044(Lnet/minecraft/class_3218;ILnet/minecraft/class_9699;Lnet/minecraft/class_1297;)V
      official b Lddy;b(Lash;ILddx;Lbvj;)V
    • onHitBlock

      public void onHitBlock(ServerWorld world, int level, EnchantmentEffectContext context, Entity enchantedEntity, Vec3d pos, BlockState state)
      Mappings:
      Namespace Name Mixin selector
      named onHitBlock Lnet/minecraft/enchantment/Enchantment;onHitBlock(Lnet/minecraft/server/world/ServerWorld;ILnet/minecraft/enchantment/EnchantmentEffectContext;Lnet/minecraft/entity/Entity;Lnet/minecraft/util/math/Vec3d;Lnet/minecraft/block/BlockState;)V
      intermediary method_60023 Lnet/minecraft/class_1887;method_60023(Lnet/minecraft/class_3218;ILnet/minecraft/class_9699;Lnet/minecraft/class_1297;Lnet/minecraft/class_243;Lnet/minecraft/class_2680;)V
      official a Lddy;a(Lash;ILddx;Lbvj;Lfbx;Ldxu;)V
    • modifyValue

      private void modifyValue(ComponentType<List<EnchantmentEffectEntry<EnchantmentValueEffect>>> type, ServerWorld world, int level, ItemStack stack, MutableFloat value)
      Mappings:
      Namespace Name Mixin selector
      named modifyValue Lnet/minecraft/enchantment/Enchantment;modifyValue(Lnet/minecraft/component/ComponentType;Lnet/minecraft/server/world/ServerWorld;ILnet/minecraft/item/ItemStack;Lorg/apache/commons/lang3/mutable/MutableFloat;)V
      intermediary method_60037 Lnet/minecraft/class_1887;method_60037(Lnet/minecraft/class_9331;Lnet/minecraft/class_3218;ILnet/minecraft/class_1799;Lorg/apache/commons/lang3/mutable/MutableFloat;)V
      official a Lddy;a(Lkt;Lash;ILcxo;Lorg/apache/commons/lang3/mutable/MutableFloat;)V
    • modifyValue

      private void modifyValue(ComponentType<List<EnchantmentEffectEntry<EnchantmentValueEffect>>> type, ServerWorld world, int level, ItemStack stack, Entity user, MutableFloat value)
      Mappings:
      Namespace Name Mixin selector
      named modifyValue Lnet/minecraft/enchantment/Enchantment;modifyValue(Lnet/minecraft/component/ComponentType;Lnet/minecraft/server/world/ServerWorld;ILnet/minecraft/item/ItemStack;Lnet/minecraft/entity/Entity;Lorg/apache/commons/lang3/mutable/MutableFloat;)V
      intermediary method_60036 Lnet/minecraft/class_1887;method_60036(Lnet/minecraft/class_9331;Lnet/minecraft/class_3218;ILnet/minecraft/class_1799;Lnet/minecraft/class_1297;Lorg/apache/commons/lang3/mutable/MutableFloat;)V
      official a Lddy;a(Lkt;Lash;ILcxo;Lbvj;Lorg/apache/commons/lang3/mutable/MutableFloat;)V
    • modifyValue

      private void modifyValue(ComponentType<List<EnchantmentEffectEntry<EnchantmentValueEffect>>> type, ServerWorld world, int level, ItemStack stack, Entity user, DamageSource damageSource, MutableFloat value)
      Mappings:
      Namespace Name Mixin selector
      named modifyValue Lnet/minecraft/enchantment/Enchantment;modifyValue(Lnet/minecraft/component/ComponentType;Lnet/minecraft/server/world/ServerWorld;ILnet/minecraft/item/ItemStack;Lnet/minecraft/entity/Entity;Lnet/minecraft/entity/damage/DamageSource;Lorg/apache/commons/lang3/mutable/MutableFloat;)V
      intermediary method_60035 Lnet/minecraft/class_1887;method_60035(Lnet/minecraft/class_9331;Lnet/minecraft/class_3218;ILnet/minecraft/class_1799;Lnet/minecraft/class_1297;Lnet/minecraft/class_1282;Lorg/apache/commons/lang3/mutable/MutableFloat;)V
      official a Lddy;a(Lkt;Lash;ILcxo;Lbvj;Lbtz;Lorg/apache/commons/lang3/mutable/MutableFloat;)V
    • createEnchantedDamageLootContext

      public static LootContext createEnchantedDamageLootContext(ServerWorld world, int level, Entity entity, DamageSource damageSource)
      Mappings:
      Namespace Name Mixin selector
      named createEnchantedDamageLootContext Lnet/minecraft/enchantment/Enchantment;createEnchantedDamageLootContext(Lnet/minecraft/server/world/ServerWorld;ILnet/minecraft/entity/Entity;Lnet/minecraft/entity/damage/DamageSource;)Lnet/minecraft/loot/context/LootContext;
      intermediary method_60040 Lnet/minecraft/class_1887;method_60040(Lnet/minecraft/class_3218;ILnet/minecraft/class_1297;Lnet/minecraft/class_1282;)Lnet/minecraft/class_47;
      official b Lddy;b(Lash;ILbvj;Lbtz;)Lewo;
    • createEnchantedItemLootContext

      private static LootContext createEnchantedItemLootContext(ServerWorld world, int level, ItemStack stack)
      Mappings:
      Namespace Name Mixin selector
      named createEnchantedItemLootContext Lnet/minecraft/enchantment/Enchantment;createEnchantedItemLootContext(Lnet/minecraft/server/world/ServerWorld;ILnet/minecraft/item/ItemStack;)Lnet/minecraft/loot/context/LootContext;
      intermediary method_60017 Lnet/minecraft/class_1887;method_60017(Lnet/minecraft/class_3218;ILnet/minecraft/class_1799;)Lnet/minecraft/class_47;
      official a Lddy;a(Lash;ILcxo;)Lewo;
    • createEnchantedLocationLootContext

      private static LootContext createEnchantedLocationLootContext(ServerWorld world, int level, Entity entity, boolean enchantmentActive)
      Mappings:
      Namespace Name Mixin selector
      named createEnchantedLocationLootContext Lnet/minecraft/enchantment/Enchantment;createEnchantedLocationLootContext(Lnet/minecraft/server/world/ServerWorld;ILnet/minecraft/entity/Entity;Z)Lnet/minecraft/loot/context/LootContext;
      intermediary method_60016 Lnet/minecraft/class_1887;method_60016(Lnet/minecraft/class_3218;ILnet/minecraft/class_1297;Z)Lnet/minecraft/class_47;
      official a Lddy;a(Lash;ILbvj;Z)Lewo;
    • createEnchantedEntityLootContext

      private static LootContext createEnchantedEntityLootContext(ServerWorld world, int level, Entity entity, Vec3d pos)
      Mappings:
      Namespace Name Mixin selector
      named createEnchantedEntityLootContext Lnet/minecraft/enchantment/Enchantment;createEnchantedEntityLootContext(Lnet/minecraft/server/world/ServerWorld;ILnet/minecraft/entity/Entity;Lnet/minecraft/util/math/Vec3d;)Lnet/minecraft/loot/context/LootContext;
      intermediary method_60015 Lnet/minecraft/class_1887;method_60015(Lnet/minecraft/class_3218;ILnet/minecraft/class_1297;Lnet/minecraft/class_243;)Lnet/minecraft/class_47;
      official a Lddy;a(Lash;ILbvj;Lfbx;)Lewo;
    • createHitBlockLootContext

      private static LootContext createHitBlockLootContext(ServerWorld world, int level, Entity entity, Vec3d pos, BlockState state)
      Mappings:
      Namespace Name Mixin selector
      named createHitBlockLootContext Lnet/minecraft/enchantment/Enchantment;createHitBlockLootContext(Lnet/minecraft/server/world/ServerWorld;ILnet/minecraft/entity/Entity;Lnet/minecraft/util/math/Vec3d;Lnet/minecraft/block/BlockState;)Lnet/minecraft/loot/context/LootContext;
      intermediary method_60768 Lnet/minecraft/class_1887;method_60768(Lnet/minecraft/class_3218;ILnet/minecraft/class_1297;Lnet/minecraft/class_243;Lnet/minecraft/class_2680;)Lnet/minecraft/class_47;
      official a Lddy;a(Lash;ILbvj;Lfbx;Ldxu;)Lewo;
    • applyEffects

      private static <T> void applyEffects(List<EnchantmentEffectEntry<T>> entries, LootContext lootContext, Consumer<T> effectConsumer)
      Mappings:
      Namespace Name Mixin selector
      named applyEffects Lnet/minecraft/enchantment/Enchantment;applyEffects(Ljava/util/List;Lnet/minecraft/loot/context/LootContext;Ljava/util/function/Consumer;)V
      intermediary method_60032 Lnet/minecraft/class_1887;method_60032(Ljava/util/List;Lnet/minecraft/class_47;Ljava/util/function/Consumer;)V
      official a Lddy;a(Ljava/util/List;Lewo;Ljava/util/function/Consumer;)V
    • applyLocationBasedEffects

      public void applyLocationBasedEffects(ServerWorld world, int level, EnchantmentEffectContext context, LivingEntity user)
      Mappings:
      Namespace Name Mixin selector
      named applyLocationBasedEffects Lnet/minecraft/enchantment/Enchantment;applyLocationBasedEffects(Lnet/minecraft/server/world/ServerWorld;ILnet/minecraft/enchantment/EnchantmentEffectContext;Lnet/minecraft/entity/LivingEntity;)V
      intermediary method_60025 Lnet/minecraft/class_1887;method_60025(Lnet/minecraft/class_3218;ILnet/minecraft/class_9699;Lnet/minecraft/class_1309;)V
      official a Lddy;a(Lash;ILddx;Lbwf;)V
    • removeLocationBasedEffects

      public void removeLocationBasedEffects(int level, EnchantmentEffectContext context, LivingEntity user)
      Mappings:
      Namespace Name Mixin selector
      named removeLocationBasedEffects Lnet/minecraft/enchantment/Enchantment;removeLocationBasedEffects(ILnet/minecraft/enchantment/EnchantmentEffectContext;Lnet/minecraft/entity/LivingEntity;)V
      intermediary method_60013 Lnet/minecraft/class_1887;method_60013(ILnet/minecraft/class_9699;Lnet/minecraft/class_1309;)V
      official a Lddy;a(ILddx;Lbwf;)V
    • builder

      public static Enchantment.Builder builder(Enchantment.Definition definition)
      Mappings:
      Namespace Name Mixin selector
      named builder Lnet/minecraft/enchantment/Enchantment;builder(Lnet/minecraft/enchantment/Enchantment$Definition;)Lnet/minecraft/enchantment/Enchantment$Builder;
      intermediary method_60030 Lnet/minecraft/class_1887;method_60030(Lnet/minecraft/class_1887$class_9427;)Lnet/minecraft/class_1887$class_9700;
      official a Lddy;a(Lddy$c;)Lddy$a;
    • hashCode

      public final int hashCode()
      Returns a hash code value for this object. The value is derived from the hash code of each of the record components.
      Specified by:
      hashCode in class Record
      Returns:
      a hash code value for this object
    • equals

      public final boolean equals(Object object)
      Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. All components in this record class are compared with Objects::equals(Object,Object).
      Specified by:
      equals in class Record
      Parameters:
      object - the object with which to compare
      Returns:
      true if this object is the same as the object argument; false otherwise.
    • description

      public Text description()
      Returns the value of the description record component.
      Returns:
      the value of the description record component
    • definition

      public Enchantment.Definition definition()
      Returns the value of the definition record component.
      Returns:
      the value of the definition record component
    • exclusiveSet

      public RegistryEntryList<Enchantment> exclusiveSet()
      Returns the value of the exclusiveSet record component.
      Returns:
      the value of the exclusiveSet record component
    • effects

      public ComponentMap effects()
      Returns the value of the effects record component.
      Returns:
      the value of the effects record component