Package net.minecraft.enchantment
Class EnchantmentHelper
java.lang.Object
net.minecraft.enchantment.EnchantmentHelper
- Mappings:
Namespace Name named net/minecraft/enchantment/EnchantmentHelperintermediary net/minecraft/class_1890official daa
-
Nested Class Summary
Nested Classes -
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic ItemEnchantmentsComponentapply(ItemStack stack, Consumer<ItemEnchantmentsComponent.Builder> applier) 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 booleancanHaveEnchantments(ItemStack stack) static Map.Entry<EquipmentSlot, ItemStack> chooseEquipmentWith(Enchantment enchantment, LivingEntity entity) Returns a pair of an equipment slot and the item stack in the supplied entity's slot.static Map.Entry<EquipmentSlot, ItemStack> chooseEquipmentWith(Enchantment enchantment, LivingEntity entity, Predicate<ItemStack> condition) Returns a pair of an equipment slot and the item stack in the supplied entity's slot.static ItemStackenchant(FeatureSet enabledFeatures, Random random, ItemStack stack, int level, boolean treasureAllowed) Enchants thetargetitem stack and returns it.private static voidforEachEnchantment(EnchantmentHelper.Consumer consumer, Iterable<ItemStack> stacks) private static voidforEachEnchantment(EnchantmentHelper.Consumer consumer, ItemStack stack) static List<EnchantmentLevelEntry> generateEnchantments(FeatureSet enabledFeatures, Random random, ItemStack stack, int level, boolean treasureAllowed) Generate the enchantments for enchanting thestack.static floatgetAttackDamage(ItemStack stack, @Nullable EntityType<?> entityType) static floatgetBreachFactor(@Nullable Entity entity, float float2) static intgetDepthStrider(LivingEntity entity) static intgetEfficiency(LivingEntity entity) static ItemEnchantmentsComponentgetEnchantments(ItemStack stack) private static DataComponentType<ItemEnchantmentsComponent> static intgetEquipmentLevel(Enchantment enchantment, LivingEntity entity) Returns the highest level of the passed enchantment in the enchantment's applicable equipment slots' item stacks.static intgetFireAspect(LivingEntity entity) static intgetKnockback(LivingEntity entity) static intgetLevel(Enchantment enchantment, ItemStack stack) Gets the level of an enchantment on an item stack.static intgetLooting(LivingEntity entity) static intgetLoyalty(ItemStack stack) static intgetLuckOfTheSea(ItemStack stack) static intstatic List<EnchantmentLevelEntry> getPossibleEntries(FeatureSet enabledFeatures, int level, ItemStack stack, boolean treasureAllowed) Gets all the possible entries for enchanting thestackat the givenpower.static intgetProtectionAmount(Iterable<ItemStack> equipment, DamageSource source) static intgetRespiration(LivingEntity entity) static intgetRiptide(ItemStack stack) static floatgetSweepingMultiplier(int level) static floatgetSweepingMultiplier(LivingEntity entity) static floatgetSwiftSneakSpeedBoost(LivingEntity entity) static booleanhasAquaAffinity(LivingEntity entity) static booleanhasBindingCurse(ItemStack stack) static booleanhasChanneling(ItemStack stack) static booleanhasEnchantments(ItemStack stack) static booleanhasFrostWalker(LivingEntity entity) static booleanhasSilkTouch(ItemStack stack) static booleanhasSoulSpeed(LivingEntity entity) static booleanhasVanishingCurse(ItemStack stack) static booleanisCompatible(Collection<RegistryEntry<Enchantment>> existing, Enchantment candidate) Returns whether thecandidateenchantment is compatible with theexistingenchantments.static voidonAttack(LivingEntity attacker, Entity target, ItemEnchantmentsComponent enchantments) static voidonTargetDamaged(LivingEntity user, Entity target) static voidonUserDamaged(LivingEntity user, Entity attacker) static voidremoveConflicts(List<EnchantmentLevelEntry> possibleEntries, EnchantmentLevelEntry pickedEntry) Remove entries conflicting with the picked entry from the possible entries.static voidset(ItemStack stack, ItemEnchantmentsComponent enchantments)
-
Field Details
-
field_38222
private static final float field_38222- See Also:
- Mappings:
Namespace Name Mixin selector named field_38222Lnet/minecraft/enchantment/EnchantmentHelper;field_38222:Fintermediary field_38222Lnet/minecraft/class_1890;field_38222:Fofficial aLdaa;a:F
-
-
Constructor Details
-
EnchantmentHelper
public EnchantmentHelper()
-
-
Method Details
-
getLevel
Gets the level of an enchantment on an item stack.- Mappings:
Namespace Name Mixin selector named getLevelLnet/minecraft/enchantment/EnchantmentHelper;getLevel(Lnet/minecraft/enchantment/Enchantment;Lnet/minecraft/item/ItemStack;)Iintermediary method_8225Lnet/minecraft/class_1890;method_8225(Lnet/minecraft/class_1887;Lnet/minecraft/class_1799;)Iofficial aLdaa;a(Lczz;Lcuo;)I
-
apply
public static ItemEnchantmentsComponent apply(ItemStack stack, Consumer<ItemEnchantmentsComponent.Builder> applier) - Mappings:
Namespace Name Mixin selector named applyLnet/minecraft/enchantment/EnchantmentHelper;apply(Lnet/minecraft/item/ItemStack;Ljava/util/function/Consumer;)Lnet/minecraft/component/type/ItemEnchantmentsComponent;intermediary method_57531Lnet/minecraft/class_1890;method_57531(Lnet/minecraft/class_1799;Ljava/util/function/Consumer;)Lnet/minecraft/class_9304;official aLdaa;a(Lcuo;Ljava/util/function/Consumer;)Ldae;
-
canHaveEnchantments
- Mappings:
Namespace Name Mixin selector named canHaveEnchantmentsLnet/minecraft/enchantment/EnchantmentHelper;canHaveEnchantments(Lnet/minecraft/item/ItemStack;)Zintermediary method_57529Lnet/minecraft/class_1890;method_57529(Lnet/minecraft/class_1799;)Zofficial aLdaa;a(Lcuo;)Z
-
set
- Mappings:
Namespace Name Mixin selector named setLnet/minecraft/enchantment/EnchantmentHelper;set(Lnet/minecraft/item/ItemStack;Lnet/minecraft/component/type/ItemEnchantmentsComponent;)Vintermediary method_57530Lnet/minecraft/class_1890;method_57530(Lnet/minecraft/class_1799;Lnet/minecraft/class_9304;)Vofficial aLdaa;a(Lcuo;Ldae;)V
-
getEnchantments
- Mappings:
Namespace Name Mixin selector named getEnchantmentsLnet/minecraft/enchantment/EnchantmentHelper;getEnchantments(Lnet/minecraft/item/ItemStack;)Lnet/minecraft/component/type/ItemEnchantmentsComponent;intermediary method_57532Lnet/minecraft/class_1890;method_57532(Lnet/minecraft/class_1799;)Lnet/minecraft/class_9304;official bLdaa;b(Lcuo;)Ldae;
-
getEnchantmentsComponentType
private static DataComponentType<ItemEnchantmentsComponent> getEnchantmentsComponentType(ItemStack stack) - Mappings:
Namespace Name Mixin selector named getEnchantmentsComponentTypeLnet/minecraft/enchantment/EnchantmentHelper;getEnchantmentsComponentType(Lnet/minecraft/item/ItemStack;)Lnet/minecraft/component/DataComponentType;intermediary method_57533Lnet/minecraft/class_1890;method_57533(Lnet/minecraft/class_1799;)Lnet/minecraft/class_9331;official lLdaa;l(Lcuo;)Lkl;
-
hasEnchantments
- Mappings:
Namespace Name Mixin selector named hasEnchantmentsLnet/minecraft/enchantment/EnchantmentHelper;hasEnchantments(Lnet/minecraft/item/ItemStack;)Zintermediary method_58117Lnet/minecraft/class_1890;method_58117(Lnet/minecraft/class_1799;)Zofficial cLdaa;c(Lcuo;)Z
-
getSweepingMultiplier
public static float getSweepingMultiplier(int level) - Mappings:
Namespace Name Mixin selector named getSweepingMultiplierLnet/minecraft/enchantment/EnchantmentHelper;getSweepingMultiplier(I)Fintermediary method_58448Lnet/minecraft/class_1890;method_58448(I)Fofficial aLdaa;a(I)F
-
forEachEnchantment
- Mappings:
Namespace Name Mixin selector named forEachEnchantmentLnet/minecraft/enchantment/EnchantmentHelper;forEachEnchantment(Lnet/minecraft/enchantment/EnchantmentHelper$Consumer;Lnet/minecraft/item/ItemStack;)Vintermediary method_8220Lnet/minecraft/class_1890;method_8220(Lnet/minecraft/class_1890$class_1891;Lnet/minecraft/class_1799;)Vofficial aLdaa;a(Ldaa$a;Lcuo;)V
-
forEachEnchantment
private static void forEachEnchantment(EnchantmentHelper.Consumer consumer, Iterable<ItemStack> stacks) - Mappings:
Namespace Name Mixin selector named forEachEnchantmentLnet/minecraft/enchantment/EnchantmentHelper;forEachEnchantment(Lnet/minecraft/enchantment/EnchantmentHelper$Consumer;Ljava/lang/Iterable;)Vintermediary method_8209Lnet/minecraft/class_1890;method_8209(Lnet/minecraft/class_1890$class_1891;Ljava/lang/Iterable;)Vofficial aLdaa;a(Ldaa$a;Ljava/lang/Iterable;)V
-
getProtectionAmount
- Mappings:
Namespace Name Mixin selector named getProtectionAmountLnet/minecraft/enchantment/EnchantmentHelper;getProtectionAmount(Ljava/lang/Iterable;Lnet/minecraft/entity/damage/DamageSource;)Iintermediary method_8219Lnet/minecraft/class_1890;method_8219(Ljava/lang/Iterable;Lnet/minecraft/class_1282;)Iofficial aLdaa;a(Ljava/lang/Iterable;Lbrm;)I
-
getAttackDamage
- Mappings:
Namespace Name Mixin selector named getAttackDamageLnet/minecraft/enchantment/EnchantmentHelper;getAttackDamage(Lnet/minecraft/item/ItemStack;Lnet/minecraft/entity/EntityType;)Fintermediary method_8218Lnet/minecraft/class_1890;method_8218(Lnet/minecraft/class_1799;Lnet/minecraft/class_1299;)Fofficial aLdaa;a(Lcuo;Lbsz;)F
-
getSweepingMultiplier
- Mappings:
Namespace Name Mixin selector named getSweepingMultiplierLnet/minecraft/enchantment/EnchantmentHelper;getSweepingMultiplier(Lnet/minecraft/entity/LivingEntity;)Fintermediary method_8217Lnet/minecraft/class_1890;method_8217(Lnet/minecraft/class_1309;)Fofficial aLdaa;a(Lbto;)F
-
getBreachFactor
- Mappings:
Namespace Name Mixin selector named getBreachFactorLnet/minecraft/enchantment/EnchantmentHelper;getBreachFactor(Lnet/minecraft/entity/Entity;F)Fintermediary method_58676Lnet/minecraft/class_1890;method_58676(Lnet/minecraft/class_1297;F)Fofficial aLdaa;a(Lbst;F)F
-
onUserDamaged
- Mappings:
Namespace Name Mixin selector named onUserDamagedLnet/minecraft/enchantment/EnchantmentHelper;onUserDamaged(Lnet/minecraft/entity/LivingEntity;Lnet/minecraft/entity/Entity;)Vintermediary method_8210Lnet/minecraft/class_1890;method_8210(Lnet/minecraft/class_1309;Lnet/minecraft/class_1297;)Vofficial aLdaa;a(Lbto;Lbst;)V
-
onTargetDamaged
- Mappings:
Namespace Name Mixin selector named onTargetDamagedLnet/minecraft/enchantment/EnchantmentHelper;onTargetDamaged(Lnet/minecraft/entity/LivingEntity;Lnet/minecraft/entity/Entity;)Vintermediary method_8213Lnet/minecraft/class_1890;method_8213(Lnet/minecraft/class_1309;Lnet/minecraft/class_1297;)Vofficial bLdaa;b(Lbto;Lbst;)V
-
onAttack
public static void onAttack(LivingEntity attacker, Entity target, ItemEnchantmentsComponent enchantments) - Mappings:
Namespace Name Mixin selector named onAttackLnet/minecraft/enchantment/EnchantmentHelper;onAttack(Lnet/minecraft/entity/LivingEntity;Lnet/minecraft/entity/Entity;Lnet/minecraft/component/type/ItemEnchantmentsComponent;)Vintermediary method_58677Lnet/minecraft/class_1890;method_58677(Lnet/minecraft/class_1309;Lnet/minecraft/class_1297;Lnet/minecraft/class_9304;)Vofficial aLdaa;a(Lbto;Lbst;Ldae;)V
-
getEquipmentLevel
Returns the highest level of the passed enchantment in the enchantment's applicable equipment slots' item stacks.- Parameters:
enchantment- the enchantmententity- the entity whose equipment slots are checked- Returns:
- the highest level of the passed enchantment in the enchantment's applicable equipment slots' item stacks
- Mappings:
Namespace Name Mixin selector named getEquipmentLevelLnet/minecraft/enchantment/EnchantmentHelper;getEquipmentLevel(Lnet/minecraft/enchantment/Enchantment;Lnet/minecraft/entity/LivingEntity;)Iintermediary method_8203Lnet/minecraft/class_1890;method_8203(Lnet/minecraft/class_1887;Lnet/minecraft/class_1309;)Iofficial aLdaa;a(Lczz;Lbto;)I
-
getSwiftSneakSpeedBoost
- Mappings:
Namespace Name Mixin selector named getSwiftSneakSpeedBoostLnet/minecraft/enchantment/EnchantmentHelper;getSwiftSneakSpeedBoost(Lnet/minecraft/entity/LivingEntity;)Fintermediary method_42304Lnet/minecraft/class_1890;method_42304(Lnet/minecraft/class_1309;)Fofficial bLdaa;b(Lbto;)F
-
getKnockback
- Mappings:
Namespace Name Mixin selector named getKnockbackLnet/minecraft/enchantment/EnchantmentHelper;getKnockback(Lnet/minecraft/entity/LivingEntity;)Iintermediary method_8205Lnet/minecraft/class_1890;method_8205(Lnet/minecraft/class_1309;)Iofficial cLdaa;c(Lbto;)I
-
getFireAspect
- Mappings:
Namespace Name Mixin selector named getFireAspectLnet/minecraft/enchantment/EnchantmentHelper;getFireAspect(Lnet/minecraft/entity/LivingEntity;)Iintermediary method_8199Lnet/minecraft/class_1890;method_8199(Lnet/minecraft/class_1309;)Iofficial dLdaa;d(Lbto;)I
-
getRespiration
- Mappings:
Namespace Name Mixin selector named getRespirationLnet/minecraft/enchantment/EnchantmentHelper;getRespiration(Lnet/minecraft/entity/LivingEntity;)Iintermediary method_8211Lnet/minecraft/class_1890;method_8211(Lnet/minecraft/class_1309;)Iofficial eLdaa;e(Lbto;)I
-
getDepthStrider
- Mappings:
Namespace Name Mixin selector named getDepthStriderLnet/minecraft/enchantment/EnchantmentHelper;getDepthStrider(Lnet/minecraft/entity/LivingEntity;)Iintermediary method_8232Lnet/minecraft/class_1890;method_8232(Lnet/minecraft/class_1309;)Iofficial fLdaa;f(Lbto;)I
-
getEfficiency
- Mappings:
Namespace Name Mixin selector named getEfficiencyLnet/minecraft/enchantment/EnchantmentHelper;getEfficiency(Lnet/minecraft/entity/LivingEntity;)Iintermediary method_8234Lnet/minecraft/class_1890;method_8234(Lnet/minecraft/class_1309;)Iofficial gLdaa;g(Lbto;)I
-
getLuckOfTheSea
- Mappings:
Namespace Name Mixin selector named getLuckOfTheSeaLnet/minecraft/enchantment/EnchantmentHelper;getLuckOfTheSea(Lnet/minecraft/item/ItemStack;)Iintermediary method_8223Lnet/minecraft/class_1890;method_8223(Lnet/minecraft/class_1799;)Iofficial dLdaa;d(Lcuo;)I
-
getLure
- Mappings:
Namespace Name Mixin selector named getLureLnet/minecraft/enchantment/EnchantmentHelper;getLure(Lnet/minecraft/item/ItemStack;)Iintermediary method_8215Lnet/minecraft/class_1890;method_8215(Lnet/minecraft/class_1799;)Iofficial eLdaa;e(Lcuo;)I
-
getLooting
- Mappings:
Namespace Name Mixin selector named getLootingLnet/minecraft/enchantment/EnchantmentHelper;getLooting(Lnet/minecraft/entity/LivingEntity;)Iintermediary method_8226Lnet/minecraft/class_1890;method_8226(Lnet/minecraft/class_1309;)Iofficial hLdaa;h(Lbto;)I
-
hasAquaAffinity
- Mappings:
Namespace Name Mixin selector named hasAquaAffinityLnet/minecraft/enchantment/EnchantmentHelper;hasAquaAffinity(Lnet/minecraft/entity/LivingEntity;)Zintermediary method_8200Lnet/minecraft/class_1890;method_8200(Lnet/minecraft/class_1309;)Zofficial iLdaa;i(Lbto;)Z
-
hasFrostWalker
- Mappings:
Namespace Name Mixin selector named hasFrostWalkerLnet/minecraft/enchantment/EnchantmentHelper;hasFrostWalker(Lnet/minecraft/entity/LivingEntity;)Zintermediary method_8216Lnet/minecraft/class_1890;method_8216(Lnet/minecraft/class_1309;)Zofficial jLdaa;j(Lbto;)Z
-
hasSoulSpeed
- Mappings:
Namespace Name Mixin selector named hasSoulSpeedLnet/minecraft/enchantment/EnchantmentHelper;hasSoulSpeed(Lnet/minecraft/entity/LivingEntity;)Zintermediary method_25951Lnet/minecraft/class_1890;method_25951(Lnet/minecraft/class_1309;)Zofficial kLdaa;k(Lbto;)Z
-
hasBindingCurse
- Mappings:
Namespace Name Mixin selector named hasBindingCurseLnet/minecraft/enchantment/EnchantmentHelper;hasBindingCurse(Lnet/minecraft/item/ItemStack;)Zintermediary method_8224Lnet/minecraft/class_1890;method_8224(Lnet/minecraft/class_1799;)Zofficial fLdaa;f(Lcuo;)Z
-
hasVanishingCurse
- Mappings:
Namespace Name Mixin selector named hasVanishingCurseLnet/minecraft/enchantment/EnchantmentHelper;hasVanishingCurse(Lnet/minecraft/item/ItemStack;)Zintermediary method_8221Lnet/minecraft/class_1890;method_8221(Lnet/minecraft/class_1799;)Zofficial gLdaa;g(Lcuo;)Z
-
hasSilkTouch
- Mappings:
Namespace Name Mixin selector named hasSilkTouchLnet/minecraft/enchantment/EnchantmentHelper;hasSilkTouch(Lnet/minecraft/item/ItemStack;)Zintermediary method_49189Lnet/minecraft/class_1890;method_49189(Lnet/minecraft/class_1799;)Zofficial hLdaa;h(Lcuo;)Z
-
getLoyalty
- Mappings:
Namespace Name Mixin selector named getLoyaltyLnet/minecraft/enchantment/EnchantmentHelper;getLoyalty(Lnet/minecraft/item/ItemStack;)Iintermediary method_8206Lnet/minecraft/class_1890;method_8206(Lnet/minecraft/class_1799;)Iofficial iLdaa;i(Lcuo;)I
-
getRiptide
- Mappings:
Namespace Name Mixin selector named getRiptideLnet/minecraft/enchantment/EnchantmentHelper;getRiptide(Lnet/minecraft/item/ItemStack;)Iintermediary method_8202Lnet/minecraft/class_1890;method_8202(Lnet/minecraft/class_1799;)Iofficial jLdaa;j(Lcuo;)I
-
hasChanneling
- Mappings:
Namespace Name Mixin selector named hasChannelingLnet/minecraft/enchantment/EnchantmentHelper;hasChanneling(Lnet/minecraft/item/ItemStack;)Zintermediary method_8228Lnet/minecraft/class_1890;method_8228(Lnet/minecraft/class_1799;)Zofficial kLdaa;k(Lcuo;)Z
-
chooseEquipmentWith
@Nullable public static Map.Entry<EquipmentSlot,ItemStack> chooseEquipmentWith(Enchantment enchantment, LivingEntity entity) Returns a pair of an equipment slot and the item stack in the supplied entity's slot. It indicates the item stack has the enchantment supplied.If multiple equipment slots' item stacks are valid, a random pair is returned.
- Parameters:
enchantment- the enchantment the equipped item stack must haveentity- the entity to choose equipments from- Returns:
- a pair of an equipment slot and the item stack in the supplied entity's slot
- Mappings:
Namespace Name Mixin selector named chooseEquipmentWithLnet/minecraft/enchantment/EnchantmentHelper;chooseEquipmentWith(Lnet/minecraft/enchantment/Enchantment;Lnet/minecraft/entity/LivingEntity;)Ljava/util/Map$Entry;intermediary method_8204Lnet/minecraft/class_1890;method_8204(Lnet/minecraft/class_1887;Lnet/minecraft/class_1309;)Ljava/util/Map$Entry;official bLdaa;b(Lczz;Lbto;)Ljava/util/Map$Entry;
-
chooseEquipmentWith
@Nullable public static Map.Entry<EquipmentSlot,ItemStack> chooseEquipmentWith(Enchantment enchantment, LivingEntity entity, Predicate<ItemStack> condition) Returns a pair of an equipment slot and the item stack in the supplied entity's slot. It indicates the item stack has the enchantment supplied and fulfills the extra condition.If multiple equipment slots' item stacks are valid, a random pair is returned.
- Parameters:
enchantment- the enchantment the equipped item stack must haveentity- the entity to choose equipments fromcondition- extra conditions for the item stack to pass for selection- Returns:
- a pair of an equipment slot and the item stack in the supplied entity's slot
- Mappings:
Namespace Name Mixin selector named chooseEquipmentWithLnet/minecraft/enchantment/EnchantmentHelper;chooseEquipmentWith(Lnet/minecraft/enchantment/Enchantment;Lnet/minecraft/entity/LivingEntity;Ljava/util/function/Predicate;)Ljava/util/Map$Entry;intermediary method_24365Lnet/minecraft/class_1890;method_24365(Lnet/minecraft/class_1887;Lnet/minecraft/class_1309;Ljava/util/function/Predicate;)Ljava/util/Map$Entry;official aLdaa;a(Lczz;Lbto;Ljava/util/function/Predicate;)Ljava/util/Map$Entry;
-
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 named calculateRequiredExperienceLevelLnet/minecraft/enchantment/EnchantmentHelper;calculateRequiredExperienceLevel(Lnet/minecraft/util/math/random/Random;IILnet/minecraft/item/ItemStack;)Iintermediary method_8227Lnet/minecraft/class_1890;method_8227(Lnet/minecraft/class_5819;IILnet/minecraft/class_1799;)Iofficial aLdaa;a(Lazg;IILcuo;)I
-
enchant
public static ItemStack enchant(FeatureSet enabledFeatures, Random random, ItemStack stack, int level, boolean treasureAllowed) Enchants thetargetitem stack and returns it.- Mappings:
Namespace Name Mixin selector named enchantLnet/minecraft/enchantment/EnchantmentHelper;enchant(Lnet/minecraft/resource/featuretoggle/FeatureSet;Lnet/minecraft/util/math/random/Random;Lnet/minecraft/item/ItemStack;IZ)Lnet/minecraft/item/ItemStack;intermediary method_8233Lnet/minecraft/class_1890;method_8233(Lnet/minecraft/class_7699;Lnet/minecraft/class_5819;Lnet/minecraft/class_1799;IZ)Lnet/minecraft/class_1799;official aLdaa;a(Lcpk;Lazg;Lcuo;IZ)Lcuo;
-
generateEnchantments
public static List<EnchantmentLevelEntry> generateEnchantments(FeatureSet enabledFeatures, Random random, ItemStack stack, int level, boolean treasureAllowed) Generate the enchantments for enchanting thestack.- Mappings:
Namespace Name Mixin selector named generateEnchantmentsLnet/minecraft/enchantment/EnchantmentHelper;generateEnchantments(Lnet/minecraft/resource/featuretoggle/FeatureSet;Lnet/minecraft/util/math/random/Random;Lnet/minecraft/item/ItemStack;IZ)Ljava/util/List;intermediary method_8230Lnet/minecraft/class_1890;method_8230(Lnet/minecraft/class_7699;Lnet/minecraft/class_5819;Lnet/minecraft/class_1799;IZ)Ljava/util/List;official bLdaa;b(Lcpk;Lazg;Lcuo;IZ)Ljava/util/List;
-
removeConflicts
public static void removeConflicts(List<EnchantmentLevelEntry> possibleEntries, EnchantmentLevelEntry pickedEntry) Remove entries conflicting with the picked entry from the possible entries.- Parameters:
possibleEntries- the possible entriespickedEntry- the picked entry- Mappings:
Namespace Name Mixin selector named removeConflictsLnet/minecraft/enchantment/EnchantmentHelper;removeConflicts(Ljava/util/List;Lnet/minecraft/enchantment/EnchantmentLevelEntry;)Vintermediary method_8231Lnet/minecraft/class_1890;method_8231(Ljava/util/List;Lnet/minecraft/class_1889;)Vofficial aLdaa;a(Ljava/util/List;Ldab;)V
-
isCompatible
public static boolean isCompatible(Collection<RegistryEntry<Enchantment>> existing, Enchantment candidate) Returns whether thecandidateenchantment is compatible with theexistingenchantments.- Returns:
- whether the
candidateenchantment is compatible with theexistingenchantments - Mappings:
Namespace Name Mixin selector named isCompatibleLnet/minecraft/enchantment/EnchantmentHelper;isCompatible(Ljava/util/Collection;Lnet/minecraft/enchantment/Enchantment;)Zintermediary method_8201Lnet/minecraft/class_1890;method_8201(Ljava/util/Collection;Lnet/minecraft/class_1887;)Zofficial aLdaa;a(Ljava/util/Collection;Lczz;)Z
-
getPossibleEntries
public static List<EnchantmentLevelEntry> getPossibleEntries(FeatureSet enabledFeatures, int level, ItemStack stack, boolean treasureAllowed) Gets all the possible entries for enchanting thestackat the givenpower.- Mappings:
Namespace Name Mixin selector named getPossibleEntriesLnet/minecraft/enchantment/EnchantmentHelper;getPossibleEntries(Lnet/minecraft/resource/featuretoggle/FeatureSet;ILnet/minecraft/item/ItemStack;Z)Ljava/util/List;intermediary method_8229Lnet/minecraft/class_1890;method_8229(Lnet/minecraft/class_7699;ILnet/minecraft/class_1799;Z)Ljava/util/List;official aLdaa;a(Lcpk;ILcuo;Z)Ljava/util/List;
-