Package net.minecraft.enchantment
Class Enchantment
java.lang.Object
net.minecraft.enchantment.Enchantment
- Direct Known Subclasses:
BindingCurseEnchantment,DamageEnchantment,DepthStriderEnchantment,FrostWalkerEnchantment,InfinityEnchantment,LuckEnchantment,MendingEnchantment,MultishotEnchantment,PiercingEnchantment,ProtectionEnchantment,RiptideEnchantment,SilkTouchEnchantment,SoulSpeedEnchantment,SwiftSneakEnchantment,ThornsEnchantment,UnbreakingEnchantment,VanishingCurseEnchantment
- Mappings:
Namespace Name official cygintermediary net/minecraft/class_1887named net/minecraft/enchantment/Enchantment
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final recordstatic final record -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final Enchantment.class_9427private final RegistryEntry.Reference<Enchantment> -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic @Nullable EnchantmentbyRawId(int id) protected booleancanAccept(Enchantment other) Returns whether this enchantment can exist on an item stack with theotherenchantment.final booleancanCombine(Enchantment other) Returns whether this enchantment can exist on an item stack with theotherenchantment and theotherenchantment can exist with this enchantment.floatgetAttackDamage(int level, @Nullable EntityType<?> entityType) getEquipment(LivingEntity entity) final intfinal intgetMaxPower(int level) final intfinal intgetMinPower(int level) getName(int level) protected StringintgetProtectionAmount(int level, DamageSource source) Deprecated.booleanisAcceptableItem(ItemStack stack) booleanReturns whether this enchantment will appear in the enchanted book trade offers of librarian villagers.booleanReturns whether this enchantment will appear in the enchanting table or loots with random enchant function.booleanisCursed()booleanstatic Enchantment.class_9426method_58440(int int2) static Enchantment.class_9426method_58441(int int2, int int3) static Enchantment.class_9427method_58442(TagKey<Item> tagKey, int int2, int int3, Enchantment.class_9426 class_9426, Enchantment.class_9426 class_94262, int int4, EquipmentSlot[] equipmentSlot) static Enchantment.class_9427method_58443(TagKey<Item> tagKey, TagKey<Item> tagKey2, int int2, int int3, Enchantment.class_9426 class_9426, Enchantment.class_9426 class_94262, int int4, EquipmentSlot[] equipmentSlot) final booleanmethod_58444(ItemStack itemStack) final intfinal intvoidonTargetDamaged(LivingEntity user, Entity target, int level) voidonUserDamaged(LivingEntity user, Entity attacker, int level)
-
Field Details
-
field_50013
- Mappings:
Namespace Name Mixin selector official bLcyg;b:Lcyg$b;intermediary field_50013Lnet/minecraft/class_1887;field_50013:Lnet/minecraft/class_1887$class_9427;named field_50013Lnet/minecraft/enchantment/Enchantment;field_50013:Lnet/minecraft/enchantment/Enchantment$class_9427;
-
translationKey
- Mappings:
Namespace Name Mixin selector official aLcyg;a:Ljava/lang/String;intermediary field_9084Lnet/minecraft/class_1887;field_9084:Ljava/lang/String;named translationKeyLnet/minecraft/enchantment/Enchantment;translationKey:Ljava/lang/String;
-
registryEntry
- Mappings:
Namespace Name Mixin selector official cLcyg;c:Liw$c;intermediary field_45769Lnet/minecraft/class_1887;field_45769:Lnet/minecraft/class_6880$class_6883;named registryEntryLnet/minecraft/enchantment/Enchantment;registryEntry:Lnet/minecraft/registry/entry/RegistryEntry$Reference;
-
-
Constructor Details
-
Enchantment
-
-
Method Details
-
method_58440
- Mappings:
Namespace Name Mixin selector official aLcyg;a(I)Lcyg$a;intermediary method_58440Lnet/minecraft/class_1887;method_58440(I)Lnet/minecraft/class_1887$class_9426;named method_58440Lnet/minecraft/enchantment/Enchantment;method_58440(I)Lnet/minecraft/enchantment/Enchantment$class_9426;
-
method_58441
- Mappings:
Namespace Name Mixin selector official aLcyg;a(II)Lcyg$a;intermediary method_58441Lnet/minecraft/class_1887;method_58441(II)Lnet/minecraft/class_1887$class_9426;named method_58441Lnet/minecraft/enchantment/Enchantment;method_58441(II)Lnet/minecraft/enchantment/Enchantment$class_9426;
-
method_58443
public static Enchantment.class_9427 method_58443(TagKey<Item> tagKey, TagKey<Item> tagKey2, int int2, int int3, Enchantment.class_9426 class_9426, Enchantment.class_9426 class_94262, int int4, EquipmentSlot[] equipmentSlot) - Mappings:
Namespace Name Mixin selector official aLcyg;a(Lawg;Lawg;IILcyg$a;Lcyg$a;I[Lbro;)Lcyg$b;intermediary method_58443Lnet/minecraft/class_1887;method_58443(Lnet/minecraft/class_6862;Lnet/minecraft/class_6862;IILnet/minecraft/class_1887$class_9426;Lnet/minecraft/class_1887$class_9426;I[Lnet/minecraft/class_1304;)Lnet/minecraft/class_1887$class_9427;named method_58443Lnet/minecraft/enchantment/Enchantment;method_58443(Lnet/minecraft/registry/tag/TagKey;Lnet/minecraft/registry/tag/TagKey;IILnet/minecraft/enchantment/Enchantment$class_9426;Lnet/minecraft/enchantment/Enchantment$class_9426;I[Lnet/minecraft/entity/EquipmentSlot;)Lnet/minecraft/enchantment/Enchantment$class_9427;
-
method_58442
public static Enchantment.class_9427 method_58442(TagKey<Item> tagKey, int int2, int int3, Enchantment.class_9426 class_9426, Enchantment.class_9426 class_94262, int int4, EquipmentSlot[] equipmentSlot) - Mappings:
Namespace Name Mixin selector official aLcyg;a(Lawg;IILcyg$a;Lcyg$a;I[Lbro;)Lcyg$b;intermediary method_58442Lnet/minecraft/class_1887;method_58442(Lnet/minecraft/class_6862;IILnet/minecraft/class_1887$class_9426;Lnet/minecraft/class_1887$class_9426;I[Lnet/minecraft/class_1304;)Lnet/minecraft/class_1887$class_9427;named method_58442Lnet/minecraft/enchantment/Enchantment;method_58442(Lnet/minecraft/registry/tag/TagKey;IILnet/minecraft/enchantment/Enchantment$class_9426;Lnet/minecraft/enchantment/Enchantment$class_9426;I[Lnet/minecraft/entity/EquipmentSlot;)Lnet/minecraft/enchantment/Enchantment$class_9427;
-
byRawId
- Mappings:
Namespace Name Mixin selector official bLcyg;b(I)Lcyg;intermediary method_8191Lnet/minecraft/class_1887;method_8191(I)Lnet/minecraft/class_1887;named byRawIdLnet/minecraft/enchantment/Enchantment;byRawId(I)Lnet/minecraft/enchantment/Enchantment;
-
getEquipment
- Mappings:
Namespace Name Mixin selector official aLcyg;a(Lbsa;)Ljava/util/Map;intermediary method_8185Lnet/minecraft/class_1887;method_8185(Lnet/minecraft/class_1309;)Ljava/util/Map;named getEquipmentLnet/minecraft/enchantment/Enchantment;getEquipment(Lnet/minecraft/entity/LivingEntity;)Ljava/util/Map;
-
getApplicableItems
- Mappings:
Namespace Name Mixin selector official cLcyg;c()Lawg;intermediary method_56109Lnet/minecraft/class_1887;method_56109()Lnet/minecraft/class_6862;named getApplicableItemsLnet/minecraft/enchantment/Enchantment;getApplicableItems()Lnet/minecraft/registry/tag/TagKey;
-
method_58444
- Mappings:
Namespace Name Mixin selector official aLcyg;a(Lcsz;)Zintermediary method_58444Lnet/minecraft/class_1887;method_58444(Lnet/minecraft/class_1799;)Znamed method_58444Lnet/minecraft/enchantment/Enchantment;method_58444(Lnet/minecraft/item/ItemStack;)Z
-
method_58445
public final int method_58445()- Mappings:
Namespace Name Mixin selector official dLcyg;d()Iintermediary method_58445Lnet/minecraft/class_1887;method_58445()Inamed method_58445Lnet/minecraft/enchantment/Enchantment;method_58445()I
-
method_58446
public final int method_58446()- Mappings:
Namespace Name Mixin selector official eLcyg;e()Iintermediary method_58446Lnet/minecraft/class_1887;method_58446()Inamed method_58446Lnet/minecraft/enchantment/Enchantment;method_58446()I
-
getMinLevel
public final int getMinLevel()- Mappings:
Namespace Name Mixin selector official fLcyg;f()Iintermediary method_8187Lnet/minecraft/class_1887;method_8187()Inamed getMinLevelLnet/minecraft/enchantment/Enchantment;getMinLevel()I
-
getMaxLevel
public final int getMaxLevel()- Mappings:
Namespace Name Mixin selector official gLcyg;g()Iintermediary method_8183Lnet/minecraft/class_1887;method_8183()Inamed getMaxLevelLnet/minecraft/enchantment/Enchantment;getMaxLevel()I
-
getMinPower
public final int getMinPower(int level) - Mappings:
Namespace Name Mixin selector official cLcyg;c(I)Iintermediary method_8182Lnet/minecraft/class_1887;method_8182(I)Inamed getMinPowerLnet/minecraft/enchantment/Enchantment;getMinPower(I)I
-
getMaxPower
public final int getMaxPower(int level) - Mappings:
Namespace Name Mixin selector official dLcyg;d(I)Iintermediary method_20742Lnet/minecraft/class_1887;method_20742(I)Inamed getMaxPowerLnet/minecraft/enchantment/Enchantment;getMaxPower(I)I
-
getProtectionAmount
- Mappings:
Namespace Name Mixin selector official aLcyg;a(ILbqf;)Iintermediary method_8181Lnet/minecraft/class_1887;method_8181(ILnet/minecraft/class_1282;)Inamed getProtectionAmountLnet/minecraft/enchantment/Enchantment;getProtectionAmount(ILnet/minecraft/entity/damage/DamageSource;)I
-
getAttackDamage
- Mappings:
Namespace Name Mixin selector official aLcyg;a(ILbrn;)Fintermediary method_8196Lnet/minecraft/class_1887;method_8196(ILnet/minecraft/class_1299;)Fnamed getAttackDamageLnet/minecraft/enchantment/Enchantment;getAttackDamage(ILnet/minecraft/entity/EntityType;)F
-
canCombine
Returns whether this enchantment can exist on an item stack with theotherenchantment and theotherenchantment can exist with this enchantment.- Returns:
- whether this enchantment can exist on an item stack with the
otherenchantment and theotherenchantment can exist with this enchantment - Mappings:
Namespace Name Mixin selector official bLcyg;b(Lcyg;)Zintermediary method_8188Lnet/minecraft/class_1887;method_8188(Lnet/minecraft/class_1887;)Znamed canCombineLnet/minecraft/enchantment/Enchantment;canCombine(Lnet/minecraft/enchantment/Enchantment;)Z
-
canAccept
Returns whether this enchantment can exist on an item stack with theotherenchantment.- Returns:
- whether this enchantment can exist on an item stack with the
otherenchantment - Mappings:
Namespace Name Mixin selector official aLcyg;a(Lcyg;)Zintermediary method_8180Lnet/minecraft/class_1887;method_8180(Lnet/minecraft/class_1887;)Znamed canAcceptLnet/minecraft/enchantment/Enchantment;canAccept(Lnet/minecraft/enchantment/Enchantment;)Z
-
getOrCreateTranslationKey
- Mappings:
Namespace Name Mixin selector official hLcyg;h()Ljava/lang/String;intermediary method_8190Lnet/minecraft/class_1887;method_8190()Ljava/lang/String;named getOrCreateTranslationKeyLnet/minecraft/enchantment/Enchantment;getOrCreateTranslationKey()Ljava/lang/String;
-
getTranslationKey
- Mappings:
Namespace Name Mixin selector official iLcyg;i()Ljava/lang/String;intermediary method_8184Lnet/minecraft/class_1887;method_8184()Ljava/lang/String;named getTranslationKeyLnet/minecraft/enchantment/Enchantment;getTranslationKey()Ljava/lang/String;
-
getName
- Mappings:
Namespace Name Mixin selector official eLcyg;e(I)Lwu;intermediary method_8179Lnet/minecraft/class_1887;method_8179(I)Lnet/minecraft/class_2561;named getNameLnet/minecraft/enchantment/Enchantment;getName(I)Lnet/minecraft/text/Text;
-
isAcceptableItem
- Mappings:
Namespace Name Mixin selector official bLcyg;b(Lcsz;)Zintermediary method_8192Lnet/minecraft/class_1887;method_8192(Lnet/minecraft/class_1799;)Znamed isAcceptableItemLnet/minecraft/enchantment/Enchantment;isAcceptableItem(Lnet/minecraft/item/ItemStack;)Z
-
onTargetDamaged
- Mappings:
Namespace Name Mixin selector official aLcyg;a(Lbsa;Lbrh;I)Vintermediary method_8189Lnet/minecraft/class_1887;method_8189(Lnet/minecraft/class_1309;Lnet/minecraft/class_1297;I)Vnamed onTargetDamagedLnet/minecraft/enchantment/Enchantment;onTargetDamaged(Lnet/minecraft/entity/LivingEntity;Lnet/minecraft/entity/Entity;I)V
-
onUserDamaged
- Mappings:
Namespace Name Mixin selector official bLcyg;b(Lbsa;Lbrh;I)Vintermediary method_8178Lnet/minecraft/class_1887;method_8178(Lnet/minecraft/class_1309;Lnet/minecraft/class_1297;I)Vnamed onUserDamagedLnet/minecraft/enchantment/Enchantment;onUserDamaged(Lnet/minecraft/entity/LivingEntity;Lnet/minecraft/entity/Entity;I)V
-
isTreasure
public boolean isTreasure()- Mappings:
Namespace Name Mixin selector official aLcyg;a()Zintermediary method_8193Lnet/minecraft/class_1887;method_8193()Znamed isTreasureLnet/minecraft/enchantment/Enchantment;isTreasure()Z
-
isCursed
public boolean isCursed()- Mappings:
Namespace Name Mixin selector official bLcyg;b()Zintermediary method_8195Lnet/minecraft/class_1887;method_8195()Znamed isCursedLnet/minecraft/enchantment/Enchantment;isCursed()Z
-
isAvailableForEnchantedBookOffer
public boolean isAvailableForEnchantedBookOffer()Returns whether this enchantment will appear in the enchanted book trade offers of librarian villagers.- Returns:
- whether this enchantment will appear in the enchanted book trade offers of librarian villagers
- Mappings:
Namespace Name Mixin selector official jLcyg;j()Zintermediary method_25949Lnet/minecraft/class_1887;method_25949()Znamed isAvailableForEnchantedBookOfferLnet/minecraft/enchantment/Enchantment;isAvailableForEnchantedBookOffer()Z
-
isAvailableForRandomSelection
public boolean isAvailableForRandomSelection()Returns whether this enchantment will appear in the enchanting table or loots with random enchant function.- Returns:
- whether this enchantment will appear in the enchanting table or loots with random enchant function
- Mappings:
Namespace Name Mixin selector official kLcyg;k()Zintermediary method_25950Lnet/minecraft/class_1887;method_25950()Znamed isAvailableForRandomSelectionLnet/minecraft/enchantment/Enchantment;isAvailableForRandomSelection()Z
-
getRegistryEntry
Deprecated.- Mappings:
Namespace Name Mixin selector official lLcyg;l()Liw$c;intermediary method_53216Lnet/minecraft/class_1887;method_53216()Lnet/minecraft/class_6880$class_6883;named getRegistryEntryLnet/minecraft/enchantment/Enchantment;getRegistryEntry()Lnet/minecraft/registry/entry/RegistryEntry$Reference;
-