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 daa
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 Ldaa;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 Ldaa;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 Ldaa;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 Ldaa;d:Lyw;
  • 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 Ldaa;a(I)Ldaa$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 Ldaa;a(II)Ldaa$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 Ldaa;a(Ljq;Ljq;IILdaa$b;Ldaa$b;I[Lbsy;)Ldaa$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 Ldaa;a(Ljq;IILdaa$b;Ldaa$b;I[Lbsy;)Ldaa$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 Ldaa;a(Lbtl;)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 Ldaa;a()Ljq;
    • 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 Ldaa;a(Lbsx;)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 Ldaa;a(Lcuo;)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 Ldaa;b(Lcuo;)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 Ldaa;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 Ldaa;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 Ldaa;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 Ldaa;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 Ldaa;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 Ldaa;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 Ldaa;a(Ljm;Ljm;)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 Ldaa;a(Ljm;I)Lwy;
    • 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 Ldaa;c(Lcuo;)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 Ldaa;a(Lkp;)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 Ldaa;a(Laqt;ILbsq;Lbrj;)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 Ldaa;a(Laqt;ILcuo;Lbsq;Lbrj;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 Ldaa;a(Laqt;ILcuo;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 Ldaa;b(Laqt;ILcuo;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 Ldaa;c(Laqt;ILcuo;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 Ldaa;d(Laqt;ILcuo;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 Ldaa;a(Laqt;ILcuo;Lbsq;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 Ldaa;e(Laqt;ILcuo;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 Ldaa;b(Laqt;ILcuo;Lbsq;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 Ldaa;a(Layv;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 Ldaa;c(Laqt;ILcuo;Lbsq;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 Ldaa;d(Laqt;ILcuo;Lbsq;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 Ldaa;b(Laqt;ILcuo;Lbsq;Lbrj;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 Ldaa;c(Laqt;ILcuo;Lbsq;Lbrj;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 Ldaa;d(Laqt;ILcuo;Lbsq;Lbrj;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 Ldaa;e(Laqt;ILcuo;Lbsq;Lbrj;Lorg/apache/commons/lang3/mutable/MutableFloat;)V
    • applyTargetedEffect

      public static void applyTargetedEffect(TargetedEnchantmentEffectType<EnchantmentEntityEffectType> effectType, 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/TargetedEnchantmentEffectType;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 Ldaa;a(Ldai;Laqt;ILczz;Lbsq;Lbrj;)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 Ldaa;a(Laqt;ILczz;Ldae;Lbsq;Lbrj;)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 Ldaa;e(Laqt;ILcuo;Lbsq;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 Ldaa;f(Laqt;ILcuo;Lbsq;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 Ldaa;b(Layv;ILorg/apache/commons/lang3/mutable/MutableFloat;)V
    • modifyValue

      public void modifyValue(ComponentType<EnchantmentValueEffectType> 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 Ldaa;a(Lkp;Layv;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 Ldaa;a(Laqt;ILczz;Lbsq;)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 Ldaa;b(Laqt;ILczz;Lbsq;)V
    • onHitBlock

      public void onHitBlock(ServerWorld world, int level, EnchantmentEffectContext context, Entity enchantedEntity, Vec3d pos, BlockState blockState)
      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 Ldaa;a(Laqt;ILczz;Lbsq;Leww;Ldta;)V
    • modifyValue

      private void modifyValue(ComponentType<List<EnchantmentEffectEntry<EnchantmentValueEffectType>>> 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 Ldaa;a(Lkp;Laqt;ILcuo;Lorg/apache/commons/lang3/mutable/MutableFloat;)V
    • modifyValue

      private void modifyValue(ComponentType<List<EnchantmentEffectEntry<EnchantmentValueEffectType>>> 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 Ldaa;a(Lkp;Laqt;ILcuo;Lbsq;Lorg/apache/commons/lang3/mutable/MutableFloat;)V
    • modifyValue

      private void modifyValue(ComponentType<List<EnchantmentEffectEntry<EnchantmentValueEffectType>>> 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 Ldaa;a(Lkp;Laqt;ILcuo;Lbsq;Lbrj;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 Ldaa;b(Laqt;ILbsq;Lbrj;)Lerl;
    • 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 Ldaa;a(Laqt;ILcuo;)Lerl;
    • 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 Ldaa;a(Laqt;ILbsq;Z)Lerl;
    • 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 Ldaa;a(Laqt;ILbsq;Leww;)Lerl;
    • method_60768

      private static LootContext method_60768(ServerWorld serverWorld, int int2, Entity entity, Vec3d vec3d, BlockState blockState)
      Mappings:
      Namespace Name Mixin selector
      named method_60768 Lnet/minecraft/enchantment/Enchantment;method_60768(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 Ldaa;a(Laqt;ILbsq;Leww;Ldta;)Lerl;
    • applyEffects

      private static <T> void applyEffects(List<EnchantmentEffectEntry<T>> conditions, 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 Ldaa;a(Ljava/util/List;Lerl;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 Ldaa;a(Laqt;ILczz;Lbtl;)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 Ldaa;a(ILczz;Lbtl;)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 Ldaa;a(Ldaa$c;)Ldaa$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