Package net.minecraft.enchantment
Class EnchantmentHelper
java.lang.Object
net.minecraft.enchantment.EnchantmentHelper
- Mappings:
Namespace Name named net/minecraft/enchantment/EnchantmentHelper
intermediary net/minecraft/class_1890
official dad
-
Nested Class Summary
-
Field Summary
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic ItemEnchantmentsComponent
apply
(ItemStack stack, Consumer<ItemEnchantmentsComponent.Builder> applier) 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.static boolean
canHaveEnchantments
(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 ItemStack
enchant
(FeatureSet enabledFeatures, Random random, ItemStack stack, int level, boolean treasureAllowed) Enchants thetarget
item stack and returns it.private static void
forEachEnchantment
(EnchantmentHelper.Consumer consumer, Iterable<ItemStack> stacks) private static void
forEachEnchantment
(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 float
getAttackDamage
(ItemStack stack, @Nullable EntityType<?> entityType) static float
getBreachFactor
(@Nullable Entity entity, float float2) static int
getDepthStrider
(LivingEntity entity) static int
getEfficiency
(LivingEntity entity) static ItemEnchantmentsComponent
getEnchantments
(ItemStack stack) private static DataComponentType
<ItemEnchantmentsComponent> static int
getEquipmentLevel
(Enchantment enchantment, LivingEntity entity) Returns the highest level of the passed enchantment in the enchantment's applicable equipment slots' item stacks.static int
getFireAspect
(LivingEntity entity) static int
getKnockback
(LivingEntity entity) static int
getLevel
(Enchantment enchantment, ItemStack stack) Gets the level of an enchantment on an item stack.static int
getLooting
(LivingEntity entity) static int
getLoyalty
(ItemStack stack) static int
getLuckOfTheSea
(ItemStack stack) static int
static List
<EnchantmentLevelEntry> getPossibleEntries
(FeatureSet enabledFeatures, int level, ItemStack stack, boolean treasureAllowed) Gets all the possible entries for enchanting thestack
at the givenpower
.static int
getProtectionAmount
(Iterable<ItemStack> equipment, DamageSource source) static int
getRespiration
(LivingEntity entity) static int
getRiptide
(ItemStack stack) static float
getSweepingMultiplier
(int level) static float
getSweepingMultiplier
(LivingEntity entity) static float
getSwiftSneakSpeedBoost
(LivingEntity entity) static boolean
hasAquaAffinity
(LivingEntity entity) static boolean
hasBindingCurse
(ItemStack stack) static boolean
hasChanneling
(ItemStack stack) static boolean
hasEnchantments
(ItemStack stack) static boolean
hasFrostWalker
(LivingEntity entity) static boolean
hasSilkTouch
(ItemStack stack) static boolean
hasSoulSpeed
(LivingEntity entity) static boolean
hasVanishingCurse
(ItemStack stack) static boolean
isCompatible
(Collection<RegistryEntry<Enchantment>> existing, Enchantment candidate) Returns whether thecandidate
enchantment is compatible with theexisting
enchantments.static void
onAttack
(LivingEntity attacker, Entity target, ItemEnchantmentsComponent enchantments) static void
onTargetDamaged
(LivingEntity user, Entity target) static void
onUserDamaged
(LivingEntity user, Entity attacker) static void
removeConflicts
(List<EnchantmentLevelEntry> possibleEntries, EnchantmentLevelEntry pickedEntry) Remove entries conflicting with the picked entry from the possible entries.static void
set
(ItemStack stack, ItemEnchantmentsComponent enchantments)
-
Field Details
-
field_38222
private static final float field_38222- See Also:
- Mappings:
Namespace Name Mixin selector named field_38222
Lnet/minecraft/enchantment/EnchantmentHelper;field_38222:F
intermediary field_38222
Lnet/minecraft/class_1890;field_38222:F
official a
Ldad;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 getLevel
Lnet/minecraft/enchantment/EnchantmentHelper;getLevel(Lnet/minecraft/enchantment/Enchantment;Lnet/minecraft/item/ItemStack;)I
intermediary method_8225
Lnet/minecraft/class_1890;method_8225(Lnet/minecraft/class_1887;Lnet/minecraft/class_1799;)I
official a
Ldad;a(Ldac;Lcur;)I
-
apply
public static ItemEnchantmentsComponent apply(ItemStack stack, Consumer<ItemEnchantmentsComponent.Builder> applier) - Mappings:
Namespace Name Mixin selector named apply
Lnet/minecraft/enchantment/EnchantmentHelper;apply(Lnet/minecraft/item/ItemStack;Ljava/util/function/Consumer;)Lnet/minecraft/component/type/ItemEnchantmentsComponent;
intermediary method_57531
Lnet/minecraft/class_1890;method_57531(Lnet/minecraft/class_1799;Ljava/util/function/Consumer;)Lnet/minecraft/class_9304;
official a
Ldad;a(Lcur;Ljava/util/function/Consumer;)Ldah;
-
canHaveEnchantments
- Mappings:
Namespace Name Mixin selector named canHaveEnchantments
Lnet/minecraft/enchantment/EnchantmentHelper;canHaveEnchantments(Lnet/minecraft/item/ItemStack;)Z
intermediary method_57529
Lnet/minecraft/class_1890;method_57529(Lnet/minecraft/class_1799;)Z
official a
Ldad;a(Lcur;)Z
-
set
- Mappings:
Namespace Name Mixin selector named set
Lnet/minecraft/enchantment/EnchantmentHelper;set(Lnet/minecraft/item/ItemStack;Lnet/minecraft/component/type/ItemEnchantmentsComponent;)V
intermediary method_57530
Lnet/minecraft/class_1890;method_57530(Lnet/minecraft/class_1799;Lnet/minecraft/class_9304;)V
official a
Ldad;a(Lcur;Ldah;)V
-
getEnchantments
- Mappings:
Namespace Name Mixin selector named getEnchantments
Lnet/minecraft/enchantment/EnchantmentHelper;getEnchantments(Lnet/minecraft/item/ItemStack;)Lnet/minecraft/component/type/ItemEnchantmentsComponent;
intermediary method_57532
Lnet/minecraft/class_1890;method_57532(Lnet/minecraft/class_1799;)Lnet/minecraft/class_9304;
official b
Ldad;b(Lcur;)Ldah;
-
getEnchantmentsComponentType
private static DataComponentType<ItemEnchantmentsComponent> getEnchantmentsComponentType(ItemStack stack) - Mappings:
Namespace Name Mixin selector named getEnchantmentsComponentType
Lnet/minecraft/enchantment/EnchantmentHelper;getEnchantmentsComponentType(Lnet/minecraft/item/ItemStack;)Lnet/minecraft/component/DataComponentType;
intermediary method_57533
Lnet/minecraft/class_1890;method_57533(Lnet/minecraft/class_1799;)Lnet/minecraft/class_9331;
official l
Ldad;l(Lcur;)Lkl;
-
hasEnchantments
- Mappings:
Namespace Name Mixin selector named hasEnchantments
Lnet/minecraft/enchantment/EnchantmentHelper;hasEnchantments(Lnet/minecraft/item/ItemStack;)Z
intermediary method_58117
Lnet/minecraft/class_1890;method_58117(Lnet/minecraft/class_1799;)Z
official c
Ldad;c(Lcur;)Z
-
getSweepingMultiplier
public static float getSweepingMultiplier(int level) - Mappings:
Namespace Name Mixin selector named getSweepingMultiplier
Lnet/minecraft/enchantment/EnchantmentHelper;getSweepingMultiplier(I)F
intermediary method_58448
Lnet/minecraft/class_1890;method_58448(I)F
official a
Ldad;a(I)F
-
forEachEnchantment
- Mappings:
Namespace Name Mixin selector named forEachEnchantment
Lnet/minecraft/enchantment/EnchantmentHelper;forEachEnchantment(Lnet/minecraft/enchantment/EnchantmentHelper$Consumer;Lnet/minecraft/item/ItemStack;)V
intermediary method_8220
Lnet/minecraft/class_1890;method_8220(Lnet/minecraft/class_1890$class_1891;Lnet/minecraft/class_1799;)V
official a
Ldad;a(Ldad$a;Lcur;)V
-
forEachEnchantment
private static void forEachEnchantment(EnchantmentHelper.Consumer consumer, Iterable<ItemStack> stacks) - Mappings:
Namespace Name Mixin selector named forEachEnchantment
Lnet/minecraft/enchantment/EnchantmentHelper;forEachEnchantment(Lnet/minecraft/enchantment/EnchantmentHelper$Consumer;Ljava/lang/Iterable;)V
intermediary method_8209
Lnet/minecraft/class_1890;method_8209(Lnet/minecraft/class_1890$class_1891;Ljava/lang/Iterable;)V
official a
Ldad;a(Ldad$a;Ljava/lang/Iterable;)V
-
getProtectionAmount
- Mappings:
Namespace Name Mixin selector named getProtectionAmount
Lnet/minecraft/enchantment/EnchantmentHelper;getProtectionAmount(Ljava/lang/Iterable;Lnet/minecraft/entity/damage/DamageSource;)I
intermediary method_8219
Lnet/minecraft/class_1890;method_8219(Ljava/lang/Iterable;Lnet/minecraft/class_1282;)I
official a
Ldad;a(Ljava/lang/Iterable;Lbrp;)I
-
getAttackDamage
- Mappings:
Namespace Name Mixin selector named getAttackDamage
Lnet/minecraft/enchantment/EnchantmentHelper;getAttackDamage(Lnet/minecraft/item/ItemStack;Lnet/minecraft/entity/EntityType;)F
intermediary method_8218
Lnet/minecraft/class_1890;method_8218(Lnet/minecraft/class_1799;Lnet/minecraft/class_1299;)F
official a
Ldad;a(Lcur;Lbtc;)F
-
getSweepingMultiplier
- Mappings:
Namespace Name Mixin selector named getSweepingMultiplier
Lnet/minecraft/enchantment/EnchantmentHelper;getSweepingMultiplier(Lnet/minecraft/entity/LivingEntity;)F
intermediary method_8217
Lnet/minecraft/class_1890;method_8217(Lnet/minecraft/class_1309;)F
official a
Ldad;a(Lbtr;)F
-
getBreachFactor
- Mappings:
Namespace Name Mixin selector named getBreachFactor
Lnet/minecraft/enchantment/EnchantmentHelper;getBreachFactor(Lnet/minecraft/entity/Entity;F)F
intermediary method_58676
Lnet/minecraft/class_1890;method_58676(Lnet/minecraft/class_1297;F)F
official a
Ldad;a(Lbsw;F)F
-
onUserDamaged
- Mappings:
Namespace Name Mixin selector named onUserDamaged
Lnet/minecraft/enchantment/EnchantmentHelper;onUserDamaged(Lnet/minecraft/entity/LivingEntity;Lnet/minecraft/entity/Entity;)V
intermediary method_8210
Lnet/minecraft/class_1890;method_8210(Lnet/minecraft/class_1309;Lnet/minecraft/class_1297;)V
official a
Ldad;a(Lbtr;Lbsw;)V
-
onTargetDamaged
- Mappings:
Namespace Name Mixin selector named onTargetDamaged
Lnet/minecraft/enchantment/EnchantmentHelper;onTargetDamaged(Lnet/minecraft/entity/LivingEntity;Lnet/minecraft/entity/Entity;)V
intermediary method_8213
Lnet/minecraft/class_1890;method_8213(Lnet/minecraft/class_1309;Lnet/minecraft/class_1297;)V
official b
Ldad;b(Lbtr;Lbsw;)V
-
onAttack
public static void onAttack(LivingEntity attacker, Entity target, ItemEnchantmentsComponent enchantments) - Mappings:
Namespace Name Mixin selector named onAttack
Lnet/minecraft/enchantment/EnchantmentHelper;onAttack(Lnet/minecraft/entity/LivingEntity;Lnet/minecraft/entity/Entity;Lnet/minecraft/component/type/ItemEnchantmentsComponent;)V
intermediary method_58677
Lnet/minecraft/class_1890;method_58677(Lnet/minecraft/class_1309;Lnet/minecraft/class_1297;Lnet/minecraft/class_9304;)V
official a
Ldad;a(Lbtr;Lbsw;Ldah;)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 getEquipmentLevel
Lnet/minecraft/enchantment/EnchantmentHelper;getEquipmentLevel(Lnet/minecraft/enchantment/Enchantment;Lnet/minecraft/entity/LivingEntity;)I
intermediary method_8203
Lnet/minecraft/class_1890;method_8203(Lnet/minecraft/class_1887;Lnet/minecraft/class_1309;)I
official a
Ldad;a(Ldac;Lbtr;)I
-
getSwiftSneakSpeedBoost
- Mappings:
Namespace Name Mixin selector named getSwiftSneakSpeedBoost
Lnet/minecraft/enchantment/EnchantmentHelper;getSwiftSneakSpeedBoost(Lnet/minecraft/entity/LivingEntity;)F
intermediary method_42304
Lnet/minecraft/class_1890;method_42304(Lnet/minecraft/class_1309;)F
official b
Ldad;b(Lbtr;)F
-
getKnockback
- Mappings:
Namespace Name Mixin selector named getKnockback
Lnet/minecraft/enchantment/EnchantmentHelper;getKnockback(Lnet/minecraft/entity/LivingEntity;)I
intermediary method_8205
Lnet/minecraft/class_1890;method_8205(Lnet/minecraft/class_1309;)I
official c
Ldad;c(Lbtr;)I
-
getFireAspect
- Mappings:
Namespace Name Mixin selector named getFireAspect
Lnet/minecraft/enchantment/EnchantmentHelper;getFireAspect(Lnet/minecraft/entity/LivingEntity;)I
intermediary method_8199
Lnet/minecraft/class_1890;method_8199(Lnet/minecraft/class_1309;)I
official d
Ldad;d(Lbtr;)I
-
getRespiration
- Mappings:
Namespace Name Mixin selector named getRespiration
Lnet/minecraft/enchantment/EnchantmentHelper;getRespiration(Lnet/minecraft/entity/LivingEntity;)I
intermediary method_8211
Lnet/minecraft/class_1890;method_8211(Lnet/minecraft/class_1309;)I
official e
Ldad;e(Lbtr;)I
-
getDepthStrider
- Mappings:
Namespace Name Mixin selector named getDepthStrider
Lnet/minecraft/enchantment/EnchantmentHelper;getDepthStrider(Lnet/minecraft/entity/LivingEntity;)I
intermediary method_8232
Lnet/minecraft/class_1890;method_8232(Lnet/minecraft/class_1309;)I
official f
Ldad;f(Lbtr;)I
-
getEfficiency
- Mappings:
Namespace Name Mixin selector named getEfficiency
Lnet/minecraft/enchantment/EnchantmentHelper;getEfficiency(Lnet/minecraft/entity/LivingEntity;)I
intermediary method_8234
Lnet/minecraft/class_1890;method_8234(Lnet/minecraft/class_1309;)I
official g
Ldad;g(Lbtr;)I
-
getLuckOfTheSea
- Mappings:
Namespace Name Mixin selector named getLuckOfTheSea
Lnet/minecraft/enchantment/EnchantmentHelper;getLuckOfTheSea(Lnet/minecraft/item/ItemStack;)I
intermediary method_8223
Lnet/minecraft/class_1890;method_8223(Lnet/minecraft/class_1799;)I
official d
Ldad;d(Lcur;)I
-
getLure
- Mappings:
Namespace Name Mixin selector named getLure
Lnet/minecraft/enchantment/EnchantmentHelper;getLure(Lnet/minecraft/item/ItemStack;)I
intermediary method_8215
Lnet/minecraft/class_1890;method_8215(Lnet/minecraft/class_1799;)I
official e
Ldad;e(Lcur;)I
-
getLooting
- Mappings:
Namespace Name Mixin selector named getLooting
Lnet/minecraft/enchantment/EnchantmentHelper;getLooting(Lnet/minecraft/entity/LivingEntity;)I
intermediary method_8226
Lnet/minecraft/class_1890;method_8226(Lnet/minecraft/class_1309;)I
official h
Ldad;h(Lbtr;)I
-
hasAquaAffinity
- Mappings:
Namespace Name Mixin selector named hasAquaAffinity
Lnet/minecraft/enchantment/EnchantmentHelper;hasAquaAffinity(Lnet/minecraft/entity/LivingEntity;)Z
intermediary method_8200
Lnet/minecraft/class_1890;method_8200(Lnet/minecraft/class_1309;)Z
official i
Ldad;i(Lbtr;)Z
-
hasFrostWalker
- Mappings:
Namespace Name Mixin selector named hasFrostWalker
Lnet/minecraft/enchantment/EnchantmentHelper;hasFrostWalker(Lnet/minecraft/entity/LivingEntity;)Z
intermediary method_8216
Lnet/minecraft/class_1890;method_8216(Lnet/minecraft/class_1309;)Z
official j
Ldad;j(Lbtr;)Z
-
hasSoulSpeed
- Mappings:
Namespace Name Mixin selector named hasSoulSpeed
Lnet/minecraft/enchantment/EnchantmentHelper;hasSoulSpeed(Lnet/minecraft/entity/LivingEntity;)Z
intermediary method_25951
Lnet/minecraft/class_1890;method_25951(Lnet/minecraft/class_1309;)Z
official k
Ldad;k(Lbtr;)Z
-
hasBindingCurse
- Mappings:
Namespace Name Mixin selector named hasBindingCurse
Lnet/minecraft/enchantment/EnchantmentHelper;hasBindingCurse(Lnet/minecraft/item/ItemStack;)Z
intermediary method_8224
Lnet/minecraft/class_1890;method_8224(Lnet/minecraft/class_1799;)Z
official f
Ldad;f(Lcur;)Z
-
hasVanishingCurse
- Mappings:
Namespace Name Mixin selector named hasVanishingCurse
Lnet/minecraft/enchantment/EnchantmentHelper;hasVanishingCurse(Lnet/minecraft/item/ItemStack;)Z
intermediary method_8221
Lnet/minecraft/class_1890;method_8221(Lnet/minecraft/class_1799;)Z
official g
Ldad;g(Lcur;)Z
-
hasSilkTouch
- Mappings:
Namespace Name Mixin selector named hasSilkTouch
Lnet/minecraft/enchantment/EnchantmentHelper;hasSilkTouch(Lnet/minecraft/item/ItemStack;)Z
intermediary method_49189
Lnet/minecraft/class_1890;method_49189(Lnet/minecraft/class_1799;)Z
official h
Ldad;h(Lcur;)Z
-
getLoyalty
- Mappings:
Namespace Name Mixin selector named getLoyalty
Lnet/minecraft/enchantment/EnchantmentHelper;getLoyalty(Lnet/minecraft/item/ItemStack;)I
intermediary method_8206
Lnet/minecraft/class_1890;method_8206(Lnet/minecraft/class_1799;)I
official i
Ldad;i(Lcur;)I
-
getRiptide
- Mappings:
Namespace Name Mixin selector named getRiptide
Lnet/minecraft/enchantment/EnchantmentHelper;getRiptide(Lnet/minecraft/item/ItemStack;)I
intermediary method_8202
Lnet/minecraft/class_1890;method_8202(Lnet/minecraft/class_1799;)I
official j
Ldad;j(Lcur;)I
-
hasChanneling
- Mappings:
Namespace Name Mixin selector named hasChanneling
Lnet/minecraft/enchantment/EnchantmentHelper;hasChanneling(Lnet/minecraft/item/ItemStack;)Z
intermediary method_8228
Lnet/minecraft/class_1890;method_8228(Lnet/minecraft/class_1799;)Z
official k
Ldad;k(Lcur;)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 chooseEquipmentWith
Lnet/minecraft/enchantment/EnchantmentHelper;chooseEquipmentWith(Lnet/minecraft/enchantment/Enchantment;Lnet/minecraft/entity/LivingEntity;)Ljava/util/Map$Entry;
intermediary method_8204
Lnet/minecraft/class_1890;method_8204(Lnet/minecraft/class_1887;Lnet/minecraft/class_1309;)Ljava/util/Map$Entry;
official b
Ldad;b(Ldac;Lbtr;)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 chooseEquipmentWith
Lnet/minecraft/enchantment/EnchantmentHelper;chooseEquipmentWith(Lnet/minecraft/enchantment/Enchantment;Lnet/minecraft/entity/LivingEntity;Ljava/util/function/Predicate;)Ljava/util/Map$Entry;
intermediary method_24365
Lnet/minecraft/class_1890;method_24365(Lnet/minecraft/class_1887;Lnet/minecraft/class_1309;Ljava/util/function/Predicate;)Ljava/util/Map$Entry;
official a
Ldad;a(Ldac;Lbtr;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 calculateRequiredExperienceLevel
Lnet/minecraft/enchantment/EnchantmentHelper;calculateRequiredExperienceLevel(Lnet/minecraft/util/math/random/Random;IILnet/minecraft/item/ItemStack;)I
intermediary method_8227
Lnet/minecraft/class_1890;method_8227(Lnet/minecraft/class_5819;IILnet/minecraft/class_1799;)I
official a
Ldad;a(Lazh;IILcur;)I
-
enchant
public static ItemStack enchant(FeatureSet enabledFeatures, Random random, ItemStack stack, int level, boolean treasureAllowed) Enchants thetarget
item stack and returns it.- Mappings:
Namespace Name Mixin selector named enchant
Lnet/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_8233
Lnet/minecraft/class_1890;method_8233(Lnet/minecraft/class_7699;Lnet/minecraft/class_5819;Lnet/minecraft/class_1799;IZ)Lnet/minecraft/class_1799;
official a
Ldad;a(Lcpn;Lazh;Lcur;IZ)Lcur;
-
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 generateEnchantments
Lnet/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_8230
Lnet/minecraft/class_1890;method_8230(Lnet/minecraft/class_7699;Lnet/minecraft/class_5819;Lnet/minecraft/class_1799;IZ)Ljava/util/List;
official b
Ldad;b(Lcpn;Lazh;Lcur;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 removeConflicts
Lnet/minecraft/enchantment/EnchantmentHelper;removeConflicts(Ljava/util/List;Lnet/minecraft/enchantment/EnchantmentLevelEntry;)V
intermediary method_8231
Lnet/minecraft/class_1890;method_8231(Ljava/util/List;Lnet/minecraft/class_1889;)V
official a
Ldad;a(Ljava/util/List;Ldae;)V
-
isCompatible
public static boolean isCompatible(Collection<RegistryEntry<Enchantment>> existing, Enchantment candidate) Returns whether thecandidate
enchantment is compatible with theexisting
enchantments.- Returns:
- whether the
candidate
enchantment is compatible with theexisting
enchantments - Mappings:
Namespace Name Mixin selector named isCompatible
Lnet/minecraft/enchantment/EnchantmentHelper;isCompatible(Ljava/util/Collection;Lnet/minecraft/enchantment/Enchantment;)Z
intermediary method_8201
Lnet/minecraft/class_1890;method_8201(Ljava/util/Collection;Lnet/minecraft/class_1887;)Z
official a
Ldad;a(Ljava/util/Collection;Ldac;)Z
-
getPossibleEntries
public static List<EnchantmentLevelEntry> getPossibleEntries(FeatureSet enabledFeatures, int level, ItemStack stack, boolean treasureAllowed) Gets all the possible entries for enchanting thestack
at the givenpower
.- Mappings:
Namespace Name Mixin selector named getPossibleEntries
Lnet/minecraft/enchantment/EnchantmentHelper;getPossibleEntries(Lnet/minecraft/resource/featuretoggle/FeatureSet;ILnet/minecraft/item/ItemStack;Z)Ljava/util/List;
intermediary method_8229
Lnet/minecraft/class_1890;method_8229(Lnet/minecraft/class_7699;ILnet/minecraft/class_1799;Z)Ljava/util/List;
official a
Ldad;a(Lcpn;ILcur;Z)Ljava/util/List;
-