Package net.minecraft.enchantment
Class EnchantmentHelper
java.lang.Object
net.minecraft.enchantment.EnchantmentHelper
- Mappings:
Namespace Name intermediary net/minecraft/class_1890official ckgnamed net/minecraft/enchantment/EnchantmentHelper
-
Nested Class Summary
Nested Classes -
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic 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 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 NbtCompoundcreateNbt(@Nullable Identifier id, int lvl) static ItemStackEnchants thetargetitem stack and returns it.private static voidforEachEnchantment(EnchantmentHelper.Consumer consumer, Iterable<ItemStack> stacks) private static voidforEachEnchantment(EnchantmentHelper.Consumer consumer, ItemStack stack) static Map<Enchantment,Integer> Loads enchantments from an NBT list.static List<EnchantmentLevelEntry>generateEnchantments(Random random, ItemStack stack, int level, boolean treasureAllowed) Generate the enchantments for enchanting thestack.static Map<Enchantment,Integer> Gets the enchantments on an item stack.static floatgetAttackDamage(ItemStack stack, EntityGroup group) static intgetDepthStrider(LivingEntity entity) static intgetEfficiency(LivingEntity entity) static @Nullable IdentifiergetEnchantmentId(Enchantment enchantment) 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 @Nullable IdentifiergetIdFromNbt(NbtCompound nbt) static intgetKnockback(LivingEntity entity) static intgetLevel(Enchantment enchantment, ItemStack stack) Gets the level of an enchantment on an item stack.static intstatic intgetLooting(LivingEntity entity) static intgetLoyalty(ItemStack stack) static intgetLuckOfTheSea(ItemStack stack) static intstatic List<EnchantmentLevelEntry>getPossibleEntries(int power, 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(LivingEntity entity) static floatgetSwiftSneakSpeedBoost(LivingEntity entity) static booleanhasAquaAffinity(LivingEntity entity) static booleanhasBindingCurse(ItemStack stack) static booleanhasChanneling(ItemStack stack) static booleanhasFrostWalker(LivingEntity entity) static booleanhasSilkTouch(ItemStack stack) static booleanhasSoulSpeed(LivingEntity entity) static booleanhasVanishingCurse(ItemStack stack) static booleanisCompatible(Collection<Enchantment> existing, Enchantment candidate) Returns whether thecandidateenchantment is compatible with theexistingenchantments.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(Map<Enchantment, Integer> enchantments, ItemStack stack) Sets the enchantments on an item stack.static voidwriteLevelToNbt(NbtCompound nbt, int lvl)
-
Field Details
-
ID_KEY
- See Also:
- Mappings:
Namespace Name Mixin selector intermediary field_34025Lnet/minecraft/class_1890;field_34025:Ljava/lang/String;official aLckg;a:Ljava/lang/String;named ID_KEYLnet/minecraft/enchantment/EnchantmentHelper;ID_KEY:Ljava/lang/String;
-
LEVEL_KEY
- See Also:
- Mappings:
Namespace Name Mixin selector intermediary field_34026Lnet/minecraft/class_1890;field_34026:Ljava/lang/String;official bLckg;b:Ljava/lang/String;named LEVEL_KEYLnet/minecraft/enchantment/EnchantmentHelper;LEVEL_KEY:Ljava/lang/String;
-
field_38222
private static final float field_38222- See Also:
- Mappings:
Namespace Name Mixin selector intermediary field_38222Lnet/minecraft/class_1890;field_38222:Fofficial cLckg;c:Fnamed field_38222Lnet/minecraft/enchantment/EnchantmentHelper;field_38222:F
-
-
Constructor Details
-
EnchantmentHelper
public EnchantmentHelper()
-
-
Method Details
-
createNbt
- Mappings:
Namespace Name Mixin selector intermediary method_37426Lnet/minecraft/class_1890;method_37426(Lnet/minecraft/class_2960;I)Lnet/minecraft/class_2487;official aLckg;a(Lacq;I)Lqr;named createNbtLnet/minecraft/enchantment/EnchantmentHelper;createNbt(Lnet/minecraft/util/Identifier;I)Lnet/minecraft/nbt/NbtCompound;
-
writeLevelToNbt
- Mappings:
Namespace Name Mixin selector intermediary method_37425Lnet/minecraft/class_1890;method_37425(Lnet/minecraft/class_2487;I)Vofficial aLckg;a(Lqr;I)Vnamed writeLevelToNbtLnet/minecraft/enchantment/EnchantmentHelper;writeLevelToNbt(Lnet/minecraft/nbt/NbtCompound;I)V
-
getLevelFromNbt
- Mappings:
Namespace Name Mixin selector intermediary method_37424Lnet/minecraft/class_1890;method_37424(Lnet/minecraft/class_2487;)Iofficial aLckg;a(Lqr;)Inamed getLevelFromNbtLnet/minecraft/enchantment/EnchantmentHelper;getLevelFromNbt(Lnet/minecraft/nbt/NbtCompound;)I
-
getIdFromNbt
- Mappings:
Namespace Name Mixin selector intermediary method_37427Lnet/minecraft/class_1890;method_37427(Lnet/minecraft/class_2487;)Lnet/minecraft/class_2960;official bLckg;b(Lqr;)Lacq;named getIdFromNbtLnet/minecraft/enchantment/EnchantmentHelper;getIdFromNbt(Lnet/minecraft/nbt/NbtCompound;)Lnet/minecraft/util/Identifier;
-
getEnchantmentId
- Mappings:
Namespace Name Mixin selector intermediary method_37423Lnet/minecraft/class_1890;method_37423(Lnet/minecraft/class_1887;)Lnet/minecraft/class_2960;official aLckg;a(Lcke;)Lacq;named getEnchantmentIdLnet/minecraft/enchantment/EnchantmentHelper;getEnchantmentId(Lnet/minecraft/enchantment/Enchantment;)Lnet/minecraft/util/Identifier;
-
getLevel
Gets the level of an enchantment on an item stack.- Mappings:
Namespace Name Mixin selector intermediary method_8225Lnet/minecraft/class_1890;method_8225(Lnet/minecraft/class_1887;Lnet/minecraft/class_1799;)Iofficial aLckg;a(Lcke;Lcfx;)Inamed getLevelLnet/minecraft/enchantment/EnchantmentHelper;getLevel(Lnet/minecraft/enchantment/Enchantment;Lnet/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:
- Mappings:
Namespace Name Mixin selector intermediary method_8222Lnet/minecraft/class_1890;method_8222(Lnet/minecraft/class_1799;)Ljava/util/Map;official aLckg;a(Lcfx;)Ljava/util/Map;named getLnet/minecraft/enchantment/EnchantmentHelper;get(Lnet/minecraft/item/ItemStack;)Ljava/util/Map;
-
fromNbt
Loads enchantments from an NBT list.- Mappings:
Namespace Name Mixin selector intermediary method_22445Lnet/minecraft/class_1890;method_22445(Lnet/minecraft/class_2499;)Ljava/util/Map;official aLckg;a(Lqx;)Ljava/util/Map;named fromNbtLnet/minecraft/enchantment/EnchantmentHelper;fromNbt(Lnet/minecraft/nbt/NbtList;)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:
- Mappings:
Namespace Name Mixin selector intermediary method_8214Lnet/minecraft/class_1890;method_8214(Ljava/util/Map;Lnet/minecraft/class_1799;)Vofficial aLckg;a(Ljava/util/Map;Lcfx;)Vnamed setLnet/minecraft/enchantment/EnchantmentHelper;set(Ljava/util/Map;Lnet/minecraft/item/ItemStack;)V
-
forEachEnchantment
- Mappings:
Namespace Name Mixin selector intermediary method_8220Lnet/minecraft/class_1890;method_8220(Lnet/minecraft/class_1890$class_1891;Lnet/minecraft/class_1799;)Vofficial aLckg;a(Lckg$a;Lcfx;)Vnamed forEachEnchantmentLnet/minecraft/enchantment/EnchantmentHelper;forEachEnchantment(Lnet/minecraft/enchantment/EnchantmentHelper$Consumer;Lnet/minecraft/item/ItemStack;)V
-
forEachEnchantment
private static void forEachEnchantment(EnchantmentHelper.Consumer consumer, Iterable<ItemStack> stacks) - Mappings:
Namespace Name Mixin selector intermediary method_8209Lnet/minecraft/class_1890;method_8209(Lnet/minecraft/class_1890$class_1891;Ljava/lang/Iterable;)Vofficial aLckg;a(Lckg$a;Ljava/lang/Iterable;)Vnamed forEachEnchantmentLnet/minecraft/enchantment/EnchantmentHelper;forEachEnchantment(Lnet/minecraft/enchantment/EnchantmentHelper$Consumer;Ljava/lang/Iterable;)V
-
getProtectionAmount
- Mappings:
Namespace Name Mixin selector intermediary method_8219Lnet/minecraft/class_1890;method_8219(Ljava/lang/Iterable;Lnet/minecraft/class_1282;)Iofficial aLckg;a(Ljava/lang/Iterable;Lbem;)Inamed getProtectionAmountLnet/minecraft/enchantment/EnchantmentHelper;getProtectionAmount(Ljava/lang/Iterable;Lnet/minecraft/entity/damage/DamageSource;)I
-
getAttackDamage
- Mappings:
Namespace Name Mixin selector intermediary method_8218Lnet/minecraft/class_1890;method_8218(Lnet/minecraft/class_1799;Lnet/minecraft/class_1310;)Fofficial aLckg;a(Lcfx;Lbgc;)Fnamed getAttackDamageLnet/minecraft/enchantment/EnchantmentHelper;getAttackDamage(Lnet/minecraft/item/ItemStack;Lnet/minecraft/entity/EntityGroup;)F
-
getSweepingMultiplier
- Mappings:
Namespace Name Mixin selector intermediary method_8217Lnet/minecraft/class_1890;method_8217(Lnet/minecraft/class_1309;)Fofficial aLckg;a(Lbfx;)Fnamed getSweepingMultiplierLnet/minecraft/enchantment/EnchantmentHelper;getSweepingMultiplier(Lnet/minecraft/entity/LivingEntity;)F
-
onUserDamaged
- Mappings:
Namespace Name Mixin selector intermediary method_8210Lnet/minecraft/class_1890;method_8210(Lnet/minecraft/class_1309;Lnet/minecraft/class_1297;)Vofficial aLckg;a(Lbfx;Lbfh;)Vnamed onUserDamagedLnet/minecraft/enchantment/EnchantmentHelper;onUserDamaged(Lnet/minecraft/entity/LivingEntity;Lnet/minecraft/entity/Entity;)V
-
onTargetDamaged
- Mappings:
Namespace Name Mixin selector intermediary method_8213Lnet/minecraft/class_1890;method_8213(Lnet/minecraft/class_1309;Lnet/minecraft/class_1297;)Vofficial bLckg;b(Lbfx;Lbfh;)Vnamed onTargetDamagedLnet/minecraft/enchantment/EnchantmentHelper;onTargetDamaged(Lnet/minecraft/entity/LivingEntity;Lnet/minecraft/entity/Entity;)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 intermediary method_8203Lnet/minecraft/class_1890;method_8203(Lnet/minecraft/class_1887;Lnet/minecraft/class_1309;)Iofficial aLckg;a(Lcke;Lbfx;)Inamed getEquipmentLevelLnet/minecraft/enchantment/EnchantmentHelper;getEquipmentLevel(Lnet/minecraft/enchantment/Enchantment;Lnet/minecraft/entity/LivingEntity;)I
-
getSwiftSneakSpeedBoost
- Mappings:
Namespace Name Mixin selector intermediary method_42304Lnet/minecraft/class_1890;method_42304(Lnet/minecraft/class_1309;)Fofficial bLckg;b(Lbfx;)Fnamed getSwiftSneakSpeedBoostLnet/minecraft/enchantment/EnchantmentHelper;getSwiftSneakSpeedBoost(Lnet/minecraft/entity/LivingEntity;)F
-
getKnockback
- Mappings:
Namespace Name Mixin selector intermediary method_8205Lnet/minecraft/class_1890;method_8205(Lnet/minecraft/class_1309;)Iofficial cLckg;c(Lbfx;)Inamed getKnockbackLnet/minecraft/enchantment/EnchantmentHelper;getKnockback(Lnet/minecraft/entity/LivingEntity;)I
-
getFireAspect
- Mappings:
Namespace Name Mixin selector intermediary method_8199Lnet/minecraft/class_1890;method_8199(Lnet/minecraft/class_1309;)Iofficial dLckg;d(Lbfx;)Inamed getFireAspectLnet/minecraft/enchantment/EnchantmentHelper;getFireAspect(Lnet/minecraft/entity/LivingEntity;)I
-
getRespiration
- Mappings:
Namespace Name Mixin selector intermediary method_8211Lnet/minecraft/class_1890;method_8211(Lnet/minecraft/class_1309;)Iofficial eLckg;e(Lbfx;)Inamed getRespirationLnet/minecraft/enchantment/EnchantmentHelper;getRespiration(Lnet/minecraft/entity/LivingEntity;)I
-
getDepthStrider
- Mappings:
Namespace Name Mixin selector intermediary method_8232Lnet/minecraft/class_1890;method_8232(Lnet/minecraft/class_1309;)Iofficial fLckg;f(Lbfx;)Inamed getDepthStriderLnet/minecraft/enchantment/EnchantmentHelper;getDepthStrider(Lnet/minecraft/entity/LivingEntity;)I
-
getEfficiency
- Mappings:
Namespace Name Mixin selector intermediary method_8234Lnet/minecraft/class_1890;method_8234(Lnet/minecraft/class_1309;)Iofficial gLckg;g(Lbfx;)Inamed getEfficiencyLnet/minecraft/enchantment/EnchantmentHelper;getEfficiency(Lnet/minecraft/entity/LivingEntity;)I
-
getLuckOfTheSea
- Mappings:
Namespace Name Mixin selector intermediary method_8223Lnet/minecraft/class_1890;method_8223(Lnet/minecraft/class_1799;)Iofficial bLckg;b(Lcfx;)Inamed getLuckOfTheSeaLnet/minecraft/enchantment/EnchantmentHelper;getLuckOfTheSea(Lnet/minecraft/item/ItemStack;)I
-
getLure
- Mappings:
Namespace Name Mixin selector intermediary method_8215Lnet/minecraft/class_1890;method_8215(Lnet/minecraft/class_1799;)Iofficial cLckg;c(Lcfx;)Inamed getLureLnet/minecraft/enchantment/EnchantmentHelper;getLure(Lnet/minecraft/item/ItemStack;)I
-
getLooting
- Mappings:
Namespace Name Mixin selector intermediary method_8226Lnet/minecraft/class_1890;method_8226(Lnet/minecraft/class_1309;)Iofficial hLckg;h(Lbfx;)Inamed getLootingLnet/minecraft/enchantment/EnchantmentHelper;getLooting(Lnet/minecraft/entity/LivingEntity;)I
-
hasAquaAffinity
- Mappings:
Namespace Name Mixin selector intermediary method_8200Lnet/minecraft/class_1890;method_8200(Lnet/minecraft/class_1309;)Zofficial iLckg;i(Lbfx;)Znamed hasAquaAffinityLnet/minecraft/enchantment/EnchantmentHelper;hasAquaAffinity(Lnet/minecraft/entity/LivingEntity;)Z
-
hasFrostWalker
- Mappings:
Namespace Name Mixin selector intermediary method_8216Lnet/minecraft/class_1890;method_8216(Lnet/minecraft/class_1309;)Zofficial jLckg;j(Lbfx;)Znamed hasFrostWalkerLnet/minecraft/enchantment/EnchantmentHelper;hasFrostWalker(Lnet/minecraft/entity/LivingEntity;)Z
-
hasSoulSpeed
- Mappings:
Namespace Name Mixin selector intermediary method_25951Lnet/minecraft/class_1890;method_25951(Lnet/minecraft/class_1309;)Zofficial kLckg;k(Lbfx;)Znamed hasSoulSpeedLnet/minecraft/enchantment/EnchantmentHelper;hasSoulSpeed(Lnet/minecraft/entity/LivingEntity;)Z
-
hasBindingCurse
- Mappings:
Namespace Name Mixin selector intermediary method_8224Lnet/minecraft/class_1890;method_8224(Lnet/minecraft/class_1799;)Zofficial dLckg;d(Lcfx;)Znamed hasBindingCurseLnet/minecraft/enchantment/EnchantmentHelper;hasBindingCurse(Lnet/minecraft/item/ItemStack;)Z
-
hasVanishingCurse
- Mappings:
Namespace Name Mixin selector intermediary method_8221Lnet/minecraft/class_1890;method_8221(Lnet/minecraft/class_1799;)Zofficial eLckg;e(Lcfx;)Znamed hasVanishingCurseLnet/minecraft/enchantment/EnchantmentHelper;hasVanishingCurse(Lnet/minecraft/item/ItemStack;)Z
-
hasSilkTouch
- Mappings:
Namespace Name Mixin selector intermediary method_49189Lnet/minecraft/class_1890;method_49189(Lnet/minecraft/class_1799;)Zofficial fLckg;f(Lcfx;)Znamed hasSilkTouchLnet/minecraft/enchantment/EnchantmentHelper;hasSilkTouch(Lnet/minecraft/item/ItemStack;)Z
-
getLoyalty
- Mappings:
Namespace Name Mixin selector intermediary method_8206Lnet/minecraft/class_1890;method_8206(Lnet/minecraft/class_1799;)Iofficial gLckg;g(Lcfx;)Inamed getLoyaltyLnet/minecraft/enchantment/EnchantmentHelper;getLoyalty(Lnet/minecraft/item/ItemStack;)I
-
getRiptide
- Mappings:
Namespace Name Mixin selector intermediary method_8202Lnet/minecraft/class_1890;method_8202(Lnet/minecraft/class_1799;)Iofficial hLckg;h(Lcfx;)Inamed getRiptideLnet/minecraft/enchantment/EnchantmentHelper;getRiptide(Lnet/minecraft/item/ItemStack;)I
-
hasChanneling
- Mappings:
Namespace Name Mixin selector intermediary method_8228Lnet/minecraft/class_1890;method_8228(Lnet/minecraft/class_1799;)Zofficial iLckg;i(Lcfx;)Znamed hasChannelingLnet/minecraft/enchantment/EnchantmentHelper;hasChanneling(Lnet/minecraft/item/ItemStack;)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 intermediary method_8204Lnet/minecraft/class_1890;method_8204(Lnet/minecraft/class_1887;Lnet/minecraft/class_1309;)Ljava/util/Map$Entry;official bLckg;b(Lcke;Lbfx;)Ljava/util/Map$Entry;named chooseEquipmentWithLnet/minecraft/enchantment/EnchantmentHelper;chooseEquipmentWith(Lnet/minecraft/enchantment/Enchantment;Lnet/minecraft/entity/LivingEntity;)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 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 aLckg;a(Lcke;Lbfx;Ljava/util/function/Predicate;)Ljava/util/Map$Entry;named chooseEquipmentWithLnet/minecraft/enchantment/EnchantmentHelper;chooseEquipmentWith(Lnet/minecraft/enchantment/Enchantment;Lnet/minecraft/entity/LivingEntity;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 intermediary method_8227Lnet/minecraft/class_1890;method_8227(Lnet/minecraft/class_5819;IILnet/minecraft/class_1799;)Iofficial aLckg;a(Lapf;IILcfx;)Inamed calculateRequiredExperienceLevelLnet/minecraft/enchantment/EnchantmentHelper;calculateRequiredExperienceLevel(Lnet/minecraft/util/math/random/Random;IILnet/minecraft/item/ItemStack;)I
-
enchant
public static ItemStack enchant(Random random, ItemStack target, int level, boolean treasureAllowed) Enchants thetargetitem stack and returns it.- Parameters:
target- the item stack to enchantlevel- the experience leveltreasureAllowed- whether treasure enchantments may appear- Mappings:
Namespace Name Mixin selector intermediary method_8233Lnet/minecraft/class_1890;method_8233(Lnet/minecraft/class_5819;Lnet/minecraft/class_1799;IZ)Lnet/minecraft/class_1799;official aLckg;a(Lapf;Lcfx;IZ)Lcfx;named enchantLnet/minecraft/enchantment/EnchantmentHelper;enchant(Lnet/minecraft/util/math/random/Random;Lnet/minecraft/item/ItemStack;IZ)Lnet/minecraft/item/ItemStack;
-
generateEnchantments
public static List<EnchantmentLevelEntry> generateEnchantments(Random random, ItemStack stack, int level, boolean treasureAllowed) Generate the enchantments for enchanting thestack.- Mappings:
Namespace Name Mixin selector intermediary method_8230Lnet/minecraft/class_1890;method_8230(Lnet/minecraft/class_5819;Lnet/minecraft/class_1799;IZ)Ljava/util/List;official bLckg;b(Lapf;Lcfx;IZ)Ljava/util/List;named generateEnchantmentsLnet/minecraft/enchantment/EnchantmentHelper;generateEnchantments(Lnet/minecraft/util/math/random/Random;Lnet/minecraft/item/ItemStack;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 intermediary method_8231Lnet/minecraft/class_1890;method_8231(Ljava/util/List;Lnet/minecraft/class_1889;)Vofficial aLckg;a(Ljava/util/List;Lckh;)Vnamed removeConflictsLnet/minecraft/enchantment/EnchantmentHelper;removeConflicts(Ljava/util/List;Lnet/minecraft/enchantment/EnchantmentLevelEntry;)V
-
isCompatible
Returns whether thecandidateenchantment is compatible with theexistingenchantments.- Returns:
- whether the
candidateenchantment is compatible with theexistingenchantments - Mappings:
Namespace Name Mixin selector intermediary method_8201Lnet/minecraft/class_1890;method_8201(Ljava/util/Collection;Lnet/minecraft/class_1887;)Zofficial aLckg;a(Ljava/util/Collection;Lcke;)Znamed isCompatibleLnet/minecraft/enchantment/EnchantmentHelper;isCompatible(Ljava/util/Collection;Lnet/minecraft/enchantment/Enchantment;)Z
-
getPossibleEntries
public static List<EnchantmentLevelEntry> getPossibleEntries(int power, ItemStack stack, boolean treasureAllowed) Gets all the possible entries for enchanting thestackat the givenpower.- Mappings:
Namespace Name Mixin selector intermediary method_8229Lnet/minecraft/class_1890;method_8229(ILnet/minecraft/class_1799;Z)Ljava/util/List;official aLckg;a(ILcfx;Z)Ljava/util/List;named getPossibleEntriesLnet/minecraft/enchantment/EnchantmentHelper;getPossibleEntries(ILnet/minecraft/item/ItemStack;Z)Ljava/util/List;
-