Package net.minecraft.enchantment
Class EnchantmentHelper
java.lang.Object
net.minecraft.enchantment.EnchantmentHelper
- Mappings:
Namespace Name official aphintermediary 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 floatgetAttackDamage(ItemStack stack, EntityGroup group) 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_5495(LivingEntity entity) static booleanmethod_5496(LivingEntity entity) static intmethod_5497(LivingEntity entity) static intmethod_5498(LivingEntity entity) static booleanmethod_5499(LivingEntity entity) static intmethod_6389(LivingEntity entity) static intmethod_6390(LivingEntity entity) static intmethod_8449(Entity rntity) static intmethod_8450(Entity 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 aLaph;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 bLaph;b:Lapn;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 cLaph;c:Lapm;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 dLaph;d:Lapk;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 eLaph;e:Lapj;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 aLaph;a(ILamj;)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 aLaph;a(Lamj;)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 aLaph;a(Ljava/util/Map;Lamj;)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 aLaph;a(I[Lamj;)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 aLaph;a(Lapl;Lamj;)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 aLaph;a(Lapl;[Lamj;)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 aLaph;a([Lamj;Lwh;)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
-
getAttackDamage
- Mappings:
Namespace Name Mixin selector official aLaph;a(Lamj;Lxs;)Fintermediary method_6384Lnet/minecraft/class_1129;method_6384(Lnet/minecraft/class_1071;Lnet/minecraft/class_873;)Fnamed getAttackDamageLnet/minecraft/enchantment/EnchantmentHelper;getAttackDamage(Lnet/minecraft/item/ItemStack;Lnet/minecraft/entity/EntityGroup;)F
-
onUserDamaged
- Mappings:
Namespace Name Mixin selector official aLaph;a(Lxm;Lwv;)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 bLaph;b(Lxm;Lwv;)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
-
getKnockback
- Mappings:
Namespace Name Mixin selector official aLaph;a(Lxm;)Iintermediary method_5493Lnet/minecraft/class_1129;method_5493(Lnet/minecraft/class_1699;)Inamed getKnockbackLnet/minecraft/enchantment/EnchantmentHelper;getKnockback(Lnet/minecraft/entity/LivingEntity;)I
-
getFireAspect
- Mappings:
Namespace Name Mixin selector official bLaph;b(Lxm;)Iintermediary method_5491Lnet/minecraft/class_1129;method_5491(Lnet/minecraft/class_1699;)Inamed getFireAspectLnet/minecraft/enchantment/EnchantmentHelper;getFireAspect(Lnet/minecraft/entity/LivingEntity;)I
-
method_8449
- Mappings:
Namespace Name Mixin selector official aLaph;a(Lwv;)Iintermediary method_8449Lnet/minecraft/class_1129;method_8449(Lnet/minecraft/class_864;)Inamed method_8449Lnet/minecraft/enchantment/EnchantmentHelper;method_8449(Lnet/minecraft/entity/Entity;)I
-
method_8450
- Mappings:
Namespace Name Mixin selector official bLaph;b(Lwv;)Iintermediary method_8450Lnet/minecraft/class_1129;method_8450(Lnet/minecraft/class_864;)Inamed method_8450Lnet/minecraft/enchantment/EnchantmentHelper;method_8450(Lnet/minecraft/entity/Entity;)I
-
method_5495
- Mappings:
Namespace Name Mixin selector official cLaph;c(Lxm;)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 eLaph;e(Lxm;)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 fLaph;f(Lxm;)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 gLaph;g(Lxm;)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 hLaph;h(Lxm;)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 iLaph;i(Lxm;)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 jLaph;j(Lxm;)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 aLaph;a(Lapf;Lxm;)Lamj;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 aLaph;a(Ljava/util/Random;IILamj;)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 aLaph;a(Ljava/util/Random;Lamj;I)Lamj;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 bLaph;b(Ljava/util/Random;Lamj;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 bLaph;b(ILamj;)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;
-