Package net.minecraft.enchantment
Class Enchantment
java.lang.Object
net.minecraft.enchantment.Enchantment
- Direct Known Subclasses:
AquaAffinityEnchantment,BindingCurseEnchantment,ChannelingEnchantment,DamageEnchantment,DepthStriderEnchantment,EfficiencyEnchantment,FireAspectEnchantment,FlameEnchantment,FrostWalkerEnchantment,ImpalingEnchantment,InfinityEnchantment,KnockbackEnchantment,LoyaltyEnchantment,LuckEnchantment,LureEnchantment,MendingEnchantment,MultishotEnchantment,PiercingEnchantment,PowerEnchantment,ProtectionEnchantment,PunchEnchantment,QuickChargeEnchantment,RespirationEnchantment,RiptideEnchantment,SilkTouchEnchantment,SoulSpeedEnchantment,SweepingEnchantment,ThornsEnchantment,UnbreakingEnchantment,VanishingCurseEnchantment
- Mappings:
Namespace Name official bujintermediary net/minecraft/class_1887named net/minecraft/enchantment/Enchantment
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classThe rarity is an attribute of an enchantment. -
Field Summary
Fields -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedEnchantment(Enchantment.Rarity weight, EnchantmentTarget type, EquipmentSlot[] slotTypes) -
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.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, EntityGroup group)getEquipment(LivingEntity entity)intintgetMaxPower(int level)intintgetMinPower(int level)getName(int level)protected StringintgetProtectionAmount(int level, DamageSource source)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()booleanvoidonTargetDamaged(LivingEntity user, Entity target, int level)voidonUserDamaged(LivingEntity user, Entity attacker, int level)
-
Field Details
-
slotTypes
- Mappings:
Namespace Name Mixin selector official aLbuj;a:[Latk;intermediary field_9086Lnet/minecraft/class_1887;field_9086:[Lnet/minecraft/class_1304;named slotTypesLnet/minecraft/enchantment/Enchantment;slotTypes:[Lnet/minecraft/entity/EquipmentSlot;
-
rarity
- Mappings:
Namespace Name Mixin selector official bLbuj;b:Lbuj$a;intermediary field_9085Lnet/minecraft/class_1887;field_9085:Lnet/minecraft/class_1887$class_1888;named rarityLnet/minecraft/enchantment/Enchantment;rarity:Lnet/minecraft/enchantment/Enchantment$Rarity;
-
type
- Mappings:
Namespace Name Mixin selector official eLbuj;e:Lbuk;intermediary field_9083Lnet/minecraft/class_1887;field_9083:Lnet/minecraft/class_1886;named typeLnet/minecraft/enchantment/Enchantment;type:Lnet/minecraft/enchantment/EnchantmentTarget;
-
translationKey
- Mappings:
Namespace Name Mixin selector official fLbuj;f:Ljava/lang/String;intermediary field_9084Lnet/minecraft/class_1887;field_9084:Ljava/lang/String;named translationKeyLnet/minecraft/enchantment/Enchantment;translationKey:Ljava/lang/String;
-
-
Constructor Details
-
Enchantment
protected Enchantment(Enchantment.Rarity weight, EnchantmentTarget type, EquipmentSlot[] slotTypes)- Mappings:
Namespace Name Mixin selector official <init>Lbuj;<init>(Lbuj$a;Lbuk;[Latk;)Vintermediary <init>Lnet/minecraft/class_1887;<init>(Lnet/minecraft/class_1887$class_1888;Lnet/minecraft/class_1886;[Lnet/minecraft/class_1304;)Vnamed <init>Lnet/minecraft/enchantment/Enchantment;<init>(Lnet/minecraft/enchantment/Enchantment$Rarity;Lnet/minecraft/enchantment/EnchantmentTarget;[Lnet/minecraft/entity/EquipmentSlot;)V
-
-
Method Details
-
byRawId
- Mappings:
Namespace Name Mixin selector official cLbuj;c(I)Lbuj;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 aLbuj;a(Latt;)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;
-
getRarity
- Mappings:
Namespace Name Mixin selector official dLbuj;d()Lbuj$a;intermediary method_8186Lnet/minecraft/class_1887;method_8186()Lnet/minecraft/class_1887$class_1888;named getRarityLnet/minecraft/enchantment/Enchantment;getRarity()Lnet/minecraft/enchantment/Enchantment$Rarity;
-
getMinLevel
public int getMinLevel()- Mappings:
Namespace Name Mixin selector official eLbuj;e()Iintermediary method_8187Lnet/minecraft/class_1887;method_8187()Inamed getMinLevelLnet/minecraft/enchantment/Enchantment;getMinLevel()I
-
getMaxLevel
public int getMaxLevel()- Mappings:
Namespace Name Mixin selector official aLbuj;a()Iintermediary method_8183Lnet/minecraft/class_1887;method_8183()Inamed getMaxLevelLnet/minecraft/enchantment/Enchantment;getMaxLevel()I
-
getMinPower
public int getMinPower(int level)- Mappings:
Namespace Name Mixin selector official aLbuj;a(I)Iintermediary method_8182Lnet/minecraft/class_1887;method_8182(I)Inamed getMinPowerLnet/minecraft/enchantment/Enchantment;getMinPower(I)I
-
getMaxPower
public int getMaxPower(int level)- Mappings:
Namespace Name Mixin selector official bLbuj;b(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 aLbuj;a(ILasp;)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 aLbuj;a(ILaty;)Fintermediary method_8196Lnet/minecraft/class_1887;method_8196(ILnet/minecraft/class_1310;)Fnamed getAttackDamageLnet/minecraft/enchantment/Enchantment;getAttackDamage(ILnet/minecraft/entity/EntityGroup;)F
-
canCombine
Returns whether this enchantment can exist on an item stack with theotherenchantment and theotherenchantment can exist with this enchantment.- Mappings:
Namespace Name Mixin selector official bLbuj;b(Lbuj;)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.- Mappings:
Namespace Name Mixin selector official aLbuj;a(Lbuj;)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 fLbuj;f()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 gLbuj;g()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 dLbuj;d(I)Los;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 aLbuj;a(Lbqp;)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 aLbuj;a(Latt;Latf;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 bLbuj;b(Latt;Latf;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 bLbuj;b()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 cLbuj;c()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.- Mappings:
Namespace Name Mixin selector official hLbuj;h()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.- Mappings:
Namespace Name Mixin selector official iLbuj;i()Zintermediary method_25950Lnet/minecraft/class_1887;method_25950()Znamed isAvailableForRandomSelectionLnet/minecraft/enchantment/Enchantment;isAvailableForRandomSelection()Z
-