Package net.minecraft.enchantment
Class EnchantmentHelper
java.lang.Object
net.minecraft.enchantment.EnchantmentHelper
- Mappings:
Namespace Name official aegintermediary net/minecraft/class_1129named net/minecraft/enchantment/EnchantmentHelper
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate static final class_1133private static final class_1132private static final class_1738private static final class_1737private static final Random -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic ItemStackaddRandomEnchantment(Random random, ItemStack stack, int int2) static intcalculateRequiredExperienceLevel(Random random, int slotIndex, int bookshelfCount, ItemStack stack) Returns the required experience level for an enchanting option in the enchanting table's screen, or the enchantment screen.static ItemStackchooseEquipmentWith(Enchantment enchantment, LivingEntity entity) static MapGets the enchantments on an item stack.static ListgetEnchantmentInfoEntries(Random random, ItemStack stack, int int2) static intgetFireAspect(LivingEntity entity) static intgetKnockback(LivingEntity entity) static intmethod_3519(int id, ItemStack stack) static intmethod_3520(int int2, ItemStack[] itemStack) static intmethod_3524(ItemStack[] itemStack, DamageSource damageSource) private static voidmethod_3526(class_1131 class_1131, ItemStack itemStack) private static voidmethod_3527(class_1131 class_1131, ItemStack[] itemStack) static Mapmethod_3528(int int2, ItemStack stack) static intmethod_5494(LivingEntity livingEntity, LivingEntity livingEntity2) static intmethod_5495(LivingEntity entity) static booleanmethod_5496(LivingEntity entity) static intmethod_5497(LivingEntity entity) static intmethod_5498(LivingEntity entity) static booleanmethod_5499(LivingEntity entity) static floatmethod_6387(LivingEntity livingEntity, LivingEntity livingEntity2) static intmethod_6389(LivingEntity entity) static intmethod_6390(LivingEntity entity) static voidonTargetDamaged(LivingEntity user, Entity attacker) static voidonUserDamaged(LivingEntity user, Entity attacker) static voidSets the enchantments on an item stack.
-
Field Details
-
RANDOM
- Mappings:
Namespace Name Mixin selector official aLaeg;a:Ljava/util/Random;intermediary field_4489Lnet/minecraft/class_1129;field_4489:Ljava/util/Random;named RANDOMLnet/minecraft/enchantment/EnchantmentHelper;RANDOM:Ljava/util/Random;
-
field_4490
- Mappings:
Namespace Name Mixin selector official bLaeg;b:Laem;intermediary field_4490Lnet/minecraft/class_1129;field_4490:Lnet/minecraft/class_1133;named field_4490Lnet/minecraft/enchantment/EnchantmentHelper;field_4490:Lnet/minecraft/enchantment/class_1133;
-
field_4491
- Mappings:
Namespace Name Mixin selector official cLaeg;c:Lael;intermediary field_4491Lnet/minecraft/class_1129;field_4491:Lnet/minecraft/class_1132;named field_4491Lnet/minecraft/enchantment/EnchantmentHelper;field_4491:Lnet/minecraft/enchantment/class_1132;
-
field_7159
- Mappings:
Namespace Name Mixin selector official dLaeg;d:Laej;intermediary field_7159Lnet/minecraft/class_1129;field_7159:Lnet/minecraft/class_1738;named field_7159Lnet/minecraft/enchantment/EnchantmentHelper;field_7159:Lnet/minecraft/enchantment/class_1738;
-
field_7160
- Mappings:
Namespace Name Mixin selector official eLaeg;e:Laei;intermediary field_7160Lnet/minecraft/class_1129;field_7160:Lnet/minecraft/class_1737;named field_7160Lnet/minecraft/enchantment/EnchantmentHelper;field_7160:Lnet/minecraft/enchantment/class_1737;
-
-
Constructor Details
-
EnchantmentHelper
public EnchantmentHelper()
-
-
Method Details
-
method_3519
- Mappings:
Namespace Name Mixin selector official aLaeg;a(ILabo;)Iintermediary method_3519Lnet/minecraft/class_1129;method_3519(ILnet/minecraft/class_1071;)Inamed method_3519Lnet/minecraft/enchantment/EnchantmentHelper;method_3519(ILnet/minecraft/item/ItemStack;)I
-
get
Gets the enchantments on an item stack.For enchanted books, it retrieves from the item stack's stored than regular enchantments.
- See Also:
-
ItemStack.getEnchantments()net.minecraft.item.EnchantedBookItem#getEnchantmentTag(ItemStack)
- Mappings:
Namespace Name Mixin selector official aLaeg;a(Labo;)Ljava/util/Map;intermediary method_4648Lnet/minecraft/class_1129;method_4648(Lnet/minecraft/class_1071;)Ljava/util/Map;named getLnet/minecraft/enchantment/EnchantmentHelper;get(Lnet/minecraft/item/ItemStack;)Ljava/util/Map;
-
set
Sets the enchantments on an item stack.For enchanted books, it sets the enchantments to the item stack's stored enchantments than regular enchantments.
- See Also:
-
ItemStack.getEnchantments()net.minecraft.item.EnchantedBookItem#getEnchantmentTag(ItemStack)
- Mappings:
Namespace Name Mixin selector official aLaeg;a(Ljava/util/Map;Labo;)Vintermediary method_4645Lnet/minecraft/class_1129;method_4645(Ljava/util/Map;Lnet/minecraft/class_1071;)Vnamed setLnet/minecraft/enchantment/EnchantmentHelper;set(Ljava/util/Map;Lnet/minecraft/item/ItemStack;)V
-
method_3520
- Mappings:
Namespace Name Mixin selector official aLaeg;a(I[Labo;)Iintermediary method_3520Lnet/minecraft/class_1129;method_3520(I[Lnet/minecraft/class_1071;)Inamed method_3520Lnet/minecraft/enchantment/EnchantmentHelper;method_3520(I[Lnet/minecraft/item/ItemStack;)I
-
method_3526
- Mappings:
Namespace Name Mixin selector official aLaeg;a(Laek;Labo;)Vintermediary method_3526Lnet/minecraft/class_1129;method_3526(Lnet/minecraft/class_1131;Lnet/minecraft/class_1071;)Vnamed method_3526Lnet/minecraft/enchantment/EnchantmentHelper;method_3526(Lnet/minecraft/enchantment/class_1131;Lnet/minecraft/item/ItemStack;)V
-
method_3527
- Mappings:
Namespace Name Mixin selector official aLaeg;a(Laek;[Labo;)Vintermediary method_3527Lnet/minecraft/class_1129;method_3527(Lnet/minecraft/class_1131;[Lnet/minecraft/class_1071;)Vnamed method_3527Lnet/minecraft/enchantment/EnchantmentHelper;method_3527(Lnet/minecraft/enchantment/class_1131;[Lnet/minecraft/item/ItemStack;)V
-
method_3524
- Mappings:
Namespace Name Mixin selector official aLaeg;a([Labo;Lqa;)Iintermediary method_3524Lnet/minecraft/class_1129;method_3524([Lnet/minecraft/class_1071;Lnet/minecraft/class_856;)Inamed method_3524Lnet/minecraft/enchantment/EnchantmentHelper;method_3524([Lnet/minecraft/item/ItemStack;Lnet/minecraft/entity/damage/DamageSource;)I
-
method_6387
- Mappings:
Namespace Name Mixin selector official aLaeg;a(Lrg;Lrg;)Fintermediary method_6387Lnet/minecraft/class_1129;method_6387(Lnet/minecraft/class_1699;Lnet/minecraft/class_1699;)Fnamed method_6387Lnet/minecraft/enchantment/EnchantmentHelper;method_6387(Lnet/minecraft/entity/LivingEntity;Lnet/minecraft/entity/LivingEntity;)F
-
onUserDamaged
- Mappings:
Namespace Name Mixin selector official aLaeg;a(Lrg;Lqm;)Vintermediary method_6386Lnet/minecraft/class_1129;method_6386(Lnet/minecraft/class_1699;Lnet/minecraft/class_864;)Vnamed onUserDamagedLnet/minecraft/enchantment/EnchantmentHelper;onUserDamaged(Lnet/minecraft/entity/LivingEntity;Lnet/minecraft/entity/Entity;)V
-
onTargetDamaged
- Mappings:
Namespace Name Mixin selector official bLaeg;b(Lrg;Lqm;)Vintermediary method_6388Lnet/minecraft/class_1129;method_6388(Lnet/minecraft/class_1699;Lnet/minecraft/class_864;)Vnamed onTargetDamagedLnet/minecraft/enchantment/EnchantmentHelper;onTargetDamaged(Lnet/minecraft/entity/LivingEntity;Lnet/minecraft/entity/Entity;)V
-
method_5494
- Mappings:
Namespace Name Mixin selector official bLaeg;b(Lrg;Lrg;)Iintermediary method_5494Lnet/minecraft/class_1129;method_5494(Lnet/minecraft/class_1699;Lnet/minecraft/class_1699;)Inamed method_5494Lnet/minecraft/enchantment/EnchantmentHelper;method_5494(Lnet/minecraft/entity/LivingEntity;Lnet/minecraft/entity/LivingEntity;)I
-
getFireAspect
- Mappings:
Namespace Name Mixin selector official aLaeg;a(Lrg;)Iintermediary method_5491Lnet/minecraft/class_1129;method_5491(Lnet/minecraft/class_1699;)Inamed getFireAspectLnet/minecraft/enchantment/EnchantmentHelper;getFireAspect(Lnet/minecraft/entity/LivingEntity;)I
-
getKnockback
- Mappings:
Namespace Name Mixin selector official bLaeg;b(Lrg;)Iintermediary method_5493Lnet/minecraft/class_1129;method_5493(Lnet/minecraft/class_1699;)Inamed getKnockbackLnet/minecraft/enchantment/EnchantmentHelper;getKnockback(Lnet/minecraft/entity/LivingEntity;)I
-
method_5495
- Mappings:
Namespace Name Mixin selector official cLaeg;c(Lrg;)Iintermediary method_5495Lnet/minecraft/class_1129;method_5495(Lnet/minecraft/class_1699;)Inamed method_5495Lnet/minecraft/enchantment/EnchantmentHelper;method_5495(Lnet/minecraft/entity/LivingEntity;)I
-
method_5496
- Mappings:
Namespace Name Mixin selector official eLaeg;e(Lrg;)Zintermediary method_5496Lnet/minecraft/class_1129;method_5496(Lnet/minecraft/class_1699;)Znamed method_5496Lnet/minecraft/enchantment/EnchantmentHelper;method_5496(Lnet/minecraft/entity/LivingEntity;)Z
-
method_5497
- Mappings:
Namespace Name Mixin selector official fLaeg;f(Lrg;)Iintermediary method_5497Lnet/minecraft/class_1129;method_5497(Lnet/minecraft/class_1699;)Inamed method_5497Lnet/minecraft/enchantment/EnchantmentHelper;method_5497(Lnet/minecraft/entity/LivingEntity;)I
-
method_6389
- Mappings:
Namespace Name Mixin selector official gLaeg;g(Lrg;)Iintermediary method_6389Lnet/minecraft/class_1129;method_6389(Lnet/minecraft/class_1699;)Inamed method_6389Lnet/minecraft/enchantment/EnchantmentHelper;method_6389(Lnet/minecraft/entity/LivingEntity;)I
-
method_6390
- Mappings:
Namespace Name Mixin selector official hLaeg;h(Lrg;)Iintermediary method_6390Lnet/minecraft/class_1129;method_6390(Lnet/minecraft/class_1699;)Inamed method_6390Lnet/minecraft/enchantment/EnchantmentHelper;method_6390(Lnet/minecraft/entity/LivingEntity;)I
-
method_5498
- Mappings:
Namespace Name Mixin selector official iLaeg;i(Lrg;)Iintermediary method_5498Lnet/minecraft/class_1129;method_5498(Lnet/minecraft/class_1699;)Inamed method_5498Lnet/minecraft/enchantment/EnchantmentHelper;method_5498(Lnet/minecraft/entity/LivingEntity;)I
-
method_5499
- Mappings:
Namespace Name Mixin selector official jLaeg;j(Lrg;)Zintermediary method_5499Lnet/minecraft/class_1129;method_5499(Lnet/minecraft/class_1699;)Znamed method_5499Lnet/minecraft/enchantment/EnchantmentHelper;method_5499(Lnet/minecraft/entity/LivingEntity;)Z
-
chooseEquipmentWith
- Mappings:
Namespace Name Mixin selector official aLaeg;a(Laee;Lrg;)Labo;intermediary method_5490Lnet/minecraft/class_1129;method_5490(Lnet/minecraft/class_1127;Lnet/minecraft/class_1699;)Lnet/minecraft/class_1071;named chooseEquipmentWithLnet/minecraft/enchantment/EnchantmentHelper;chooseEquipmentWith(Lnet/minecraft/enchantment/Enchantment;Lnet/minecraft/entity/LivingEntity;)Lnet/minecraft/item/ItemStack;
-
calculateRequiredExperienceLevel
public static int calculateRequiredExperienceLevel(Random random, int slotIndex, int bookshelfCount, ItemStack stack) Returns the required experience level for an enchanting option in the enchanting table's screen, or the enchantment screen.- Parameters:
random- the random, which guarantees consistent results with the same seedslotIndex- the index of the enchanting optionbookshelfCount- the number of bookshelvesstack- the item stack to enchant- Returns:
- the required experience level for an enchanting option in the enchanting table's screen, or the enchantment screen
- Mappings:
Namespace Name Mixin selector official aLaeg;a(Ljava/util/Random;IILabo;)Iintermediary method_3521Lnet/minecraft/class_1129;method_3521(Ljava/util/Random;IILnet/minecraft/class_1071;)Inamed calculateRequiredExperienceLevelLnet/minecraft/enchantment/EnchantmentHelper;calculateRequiredExperienceLevel(Ljava/util/Random;IILnet/minecraft/item/ItemStack;)I
-
addRandomEnchantment
- Mappings:
Namespace Name Mixin selector official aLaeg;a(Ljava/util/Random;Labo;I)Labo;intermediary method_6385Lnet/minecraft/class_1129;method_6385(Ljava/util/Random;Lnet/minecraft/class_1071;I)Lnet/minecraft/class_1071;named addRandomEnchantmentLnet/minecraft/enchantment/EnchantmentHelper;addRandomEnchantment(Ljava/util/Random;Lnet/minecraft/item/ItemStack;I)Lnet/minecraft/item/ItemStack;
-
getEnchantmentInfoEntries
- Mappings:
Namespace Name Mixin selector official bLaeg;b(Ljava/util/Random;Labo;I)Ljava/util/List;intermediary method_3529Lnet/minecraft/class_1129;method_3529(Ljava/util/Random;Lnet/minecraft/class_1071;I)Ljava/util/List;named getEnchantmentInfoEntriesLnet/minecraft/enchantment/EnchantmentHelper;getEnchantmentInfoEntries(Ljava/util/Random;Lnet/minecraft/item/ItemStack;I)Ljava/util/List;
-
method_3528
- Mappings:
Namespace Name Mixin selector official bLaeg;b(ILabo;)Ljava/util/Map;intermediary method_3528Lnet/minecraft/class_1129;method_3528(ILnet/minecraft/class_1071;)Ljava/util/Map;named method_3528Lnet/minecraft/enchantment/EnchantmentHelper;method_3528(ILnet/minecraft/item/ItemStack;)Ljava/util/Map;
-