Uses of Class
net.minecraft.world.item.enchantment.Enchantment
Packages that use Enchantment
Package
Description
-
Uses of Enchantment in net.minecraft.advancements.critereon
Fields in net.minecraft.advancements.critereon with type parameters of type EnchantmentModifier and TypeFieldDescriptionprivate final Optional<Holder<Enchantment>> EnchantmentPredicate.enchantmentThe field for theenchantmentrecord component.Methods in net.minecraft.advancements.critereon that return types with arguments of type EnchantmentModifier and TypeMethodDescriptionEnchantmentPredicate.enchantment()Returns the value of theenchantmentrecord component.Constructors in net.minecraft.advancements.critereon with parameters of type EnchantmentModifierConstructorDescriptionEnchantmentPredicate(Enchantment p_30471_, MinMaxBounds.Ints p_30472_) Constructor parameters in net.minecraft.advancements.critereon with type arguments of type EnchantmentModifierConstructorDescriptionEnchantmentPredicate(Optional<Holder<Enchantment>> enchantment, MinMaxBounds.Ints level) Creates an instance of aEnchantmentPredicaterecord class. -
Uses of Enchantment in net.minecraft.commands.arguments
Methods in net.minecraft.commands.arguments that return types with arguments of type EnchantmentModifier and TypeMethodDescriptionstatic Holder.Reference<Enchantment> ResourceArgument.getEnchantment(com.mojang.brigadier.context.CommandContext<CommandSourceStack> p_248656_, String p_248713_) -
Uses of Enchantment in net.minecraft.core.registries
Fields in net.minecraft.core.registries with type parameters of type EnchantmentModifier and TypeFieldDescriptionstatic final Registry<Enchantment> BuiltInRegistries.ENCHANTMENTstatic final ResourceKey<Registry<Enchantment>> Registries.ENCHANTMENT -
Uses of Enchantment in net.minecraft.data.tags
Methods in net.minecraft.data.tags with parameters of type EnchantmentModifier and TypeMethodDescriptionprotected voidEnchantmentTagsProvider.tooltipOrder(HolderLookup.Provider p_341105_, Enchantment... p_341174_) -
Uses of Enchantment in net.minecraft.server.commands
Method parameters in net.minecraft.server.commands with type arguments of type EnchantmentModifier and TypeMethodDescriptionprivate static intEnchantCommand.enchant(CommandSourceStack p_249815_, Collection<? extends Entity> p_248848_, Holder<Enchantment> p_251252_, int p_249941_) -
Uses of Enchantment in net.minecraft.tags
Fields in net.minecraft.tags with type parameters of type EnchantmentMethods in net.minecraft.tags that return types with arguments of type Enchantment -
Uses of Enchantment in net.minecraft.world.entity.npc
Fields in net.minecraft.world.entity.npc with type parameters of type EnchantmentModifier and TypeFieldDescriptionprivate final List<Enchantment> VillagerTrades.EnchantBookForEmeralds.tradeableEnchantmentsMethods in net.minecraft.world.entity.npc that return EnchantmentModifier and TypeMethodDescriptionprivate EnchantmentVillagerTrades.EnchantBookForEmeralds.getEnchantment(RandomSource p_342021_, FeatureFlagSet p_342019_) Methods in net.minecraft.world.entity.npc with parameters of type EnchantmentModifier and TypeMethodDescriptionprivate static ItemStackVillagerTrades.enchant(Item p_301995_, Enchantment p_302009_, int p_302011_) Constructors in net.minecraft.world.entity.npc with parameters of type EnchantmentModifierConstructorDescriptionEnchantBookForEmeralds(int p_296300_, int p_294555_, int p_296182_, Enchantment... p_295821_) EnchantBookForEmeralds(int p_296323_, Enchantment... p_294878_) -
Uses of Enchantment in net.minecraft.world.item
Methods in net.minecraft.world.item with parameters of type EnchantmentMethod parameters in net.minecraft.world.item with type arguments of type EnchantmentModifier and TypeMethodDescriptionprivate static voidCreativeModeTabs.generateEnchantmentBookTypesAllLevels(CreativeModeTab.Output p_270961_, HolderLookup<Enchantment> p_270628_, Set<TagKey<Item>> p_271024_, CreativeModeTab.TabVisibility p_270805_, FeatureFlagSet p_338625_) private static voidCreativeModeTabs.generateEnchantmentBookTypesOnlyMaxLevel(CreativeModeTab.Output p_270868_, HolderLookup<Enchantment> p_270903_, Set<TagKey<Item>> p_270380_, CreativeModeTab.TabVisibility p_270407_, FeatureFlagSet p_338678_) -
Uses of Enchantment in net.minecraft.world.item.enchantment
Subclasses of Enchantment in net.minecraft.world.item.enchantmentModifier and TypeClassDescriptionclassclassclassclassclassclassclassclassclassclassclassclassclassclassclassclassclassclassclassclassFields in net.minecraft.world.item.enchantment declared as EnchantmentModifier and TypeFieldDescriptionstatic final EnchantmentEnchantments.AQUA_AFFINITYstatic final EnchantmentEnchantments.BANE_OF_ARTHROPODSstatic final EnchantmentEnchantments.BINDING_CURSEstatic final EnchantmentEnchantments.BLAST_PROTECTIONstatic final EnchantmentEnchantments.BREACHstatic final EnchantmentEnchantments.CHANNELINGstatic final EnchantmentEnchantments.DENSITYstatic final EnchantmentEnchantments.DEPTH_STRIDERstatic final EnchantmentEnchantments.EFFICIENCYfinal EnchantmentEnchantmentInstance.enchantmentstatic final EnchantmentEnchantments.FEATHER_FALLINGstatic final EnchantmentEnchantments.FIRE_ASPECTstatic final EnchantmentEnchantments.FIRE_PROTECTIONstatic final EnchantmentEnchantments.FLAMEstatic final EnchantmentEnchantments.FORTUNEstatic final EnchantmentEnchantments.FROST_WALKERstatic final EnchantmentEnchantments.IMPALINGstatic final EnchantmentEnchantments.INFINITYstatic final EnchantmentEnchantments.KNOCKBACKstatic final EnchantmentEnchantments.LOOTINGstatic final EnchantmentEnchantments.LOYALTYstatic final EnchantmentEnchantments.LUCK_OF_THE_SEAstatic final EnchantmentEnchantments.LUREstatic final EnchantmentEnchantments.MENDINGstatic final EnchantmentEnchantments.MULTISHOTstatic final EnchantmentEnchantments.PIERCINGstatic final EnchantmentEnchantments.POWERstatic final EnchantmentEnchantments.PROJECTILE_PROTECTIONstatic final EnchantmentEnchantments.PROTECTIONstatic final EnchantmentEnchantments.PUNCHstatic final EnchantmentEnchantments.QUICK_CHARGEstatic final EnchantmentEnchantments.RESPIRATIONstatic final EnchantmentEnchantments.RIPTIDEstatic final EnchantmentEnchantments.SHARPNESSstatic final EnchantmentEnchantments.SILK_TOUCHstatic final EnchantmentEnchantments.SMITEstatic final EnchantmentEnchantments.SOUL_SPEEDstatic final EnchantmentEnchantments.SWEEPING_EDGEstatic final EnchantmentEnchantments.SWIFT_SNEAKstatic final EnchantmentEnchantments.THORNSstatic final EnchantmentEnchantments.UNBREAKINGstatic final EnchantmentEnchantments.VANISHING_CURSEstatic final EnchantmentEnchantments.WIND_BURSTFields in net.minecraft.world.item.enchantment with type parameters of type EnchantmentModifier and TypeFieldDescriptionprivate final Holder.Reference<Enchantment> Enchantment.builtInRegistryHolder(package private) final it.unimi.dsi.fastutil.objects.Object2IntOpenHashMap<Holder<Enchantment>> ItemEnchantments.enchantmentsprivate final it.unimi.dsi.fastutil.objects.Object2IntOpenHashMap<Holder<Enchantment>> ItemEnchantments.Mutable.enchantmentsprivate static final com.mojang.serialization.Codec<it.unimi.dsi.fastutil.objects.Object2IntOpenHashMap<Holder<Enchantment>>> ItemEnchantments.LEVELS_CODECMethods in net.minecraft.world.item.enchantment that return EnchantmentModifier and TypeMethodDescriptionstatic EnchantmentEnchantment.byId(int p_44698_) private static EnchantmentEnchantments.register(String p_44993_, Enchantment p_44994_) Methods in net.minecraft.world.item.enchantment that return types with arguments of type EnchantmentModifier and TypeMethodDescriptionEnchantment.builtInRegistryHolder()Deprecated.Set<it.unimi.dsi.fastutil.objects.Object2IntMap.Entry<Holder<Enchantment>>> ItemEnchantments.entrySet()ItemEnchantments.keySet()ItemEnchantments.Mutable.keySet()Methods in net.minecraft.world.item.enchantment with parameters of type EnchantmentModifier and TypeMethodDescriptionvoidEnchantmentHelper.EnchantmentVisitor.accept(Enchantment p_44945_, int p_44946_) booleanArrowInfiniteEnchantment.checkCompatibility(Enchantment p_44590_) booleanArrowPiercingEnchantment.checkCompatibility(Enchantment p_44608_) booleanDamageEnchantment.checkCompatibility(Enchantment p_44644_) protected booleanEnchantment.checkCompatibility(Enchantment p_44690_) booleanFrostWalkerEnchantment.checkCompatibility(Enchantment p_45024_) booleanLootBonusEnchantment.checkCompatibility(Enchantment p_45094_) booleanMultiShotEnchantment.checkCompatibility(Enchantment p_45113_) booleanProtectionEnchantment.checkCompatibility(Enchantment p_45142_) booleanTridentRiptideEnchantment.checkCompatibility(Enchantment p_45256_) booleanUntouchingEnchantment.checkCompatibility(Enchantment p_45266_) booleanWaterWalkerEnchantment.checkCompatibility(Enchantment p_45286_) static intEnchantmentHelper.getEnchantmentLevel(Enchantment p_44837_, LivingEntity p_44838_) static intEnchantmentHelper.getItemEnchantmentLevel(Enchantment p_44844_, ItemStack p_44845_) Deprecated.intItemEnchantments.getLevel(Enchantment p_330552_) intItemEnchantments.Mutable.getLevel(Enchantment p_331330_) static Map.Entry<EquipmentSlot, ItemStack> EnchantmentHelper.getRandomItemWith(Enchantment p_44907_, LivingEntity p_44908_) static Map.Entry<EquipmentSlot, ItemStack> EnchantmentHelper.getRandomItemWith(Enchantment p_44840_, LivingEntity p_44841_, Predicate<ItemStack> p_44842_) final booleanEnchantment.isCompatibleWith(Enchantment p_44696_) static booleanEnchantmentHelper.isEnchantmentCompatible(Collection<Holder<Enchantment>> p_44860_, Enchantment p_44861_) private static EnchantmentEnchantments.register(String p_44993_, Enchantment p_44994_) voidItemEnchantments.Mutable.set(Enchantment p_331872_, int p_330832_) voidItemEnchantments.Mutable.upgrade(Enchantment p_330536_, int p_331153_) Method parameters in net.minecraft.world.item.enchantment with type arguments of type EnchantmentModifier and TypeMethodDescriptionstatic booleanEnchantmentHelper.isEnchantmentCompatible(Collection<Holder<Enchantment>> p_44860_, Enchantment p_44861_) voidItemEnchantments.Mutable.removeIf(Predicate<Holder<Enchantment>> p_332079_) Constructors in net.minecraft.world.item.enchantment with parameters of type EnchantmentConstructor parameters in net.minecraft.world.item.enchantment with type arguments of type EnchantmentModifierConstructorDescription(package private)ItemEnchantments(it.unimi.dsi.fastutil.objects.Object2IntOpenHashMap<Holder<Enchantment>> p_341287_, boolean p_330219_) -
Uses of Enchantment in net.minecraft.world.level.storage.loot.functions
Fields in net.minecraft.world.level.storage.loot.functions with type parameters of type EnchantmentModifier and TypeFieldDescriptionprivate final Holder<Enchantment> ApplyBonusCount.enchantmentprivate static final com.mojang.serialization.Codec<HolderSet<Enchantment>> EnchantRandomlyFunction.ENCHANTMENT_SET_CODECprivate final List<Holder<Enchantment>> EnchantRandomlyFunction.Builder.enchantmentsprivate final Optional<HolderSet<Enchantment>> EnchantRandomlyFunction.enchantmentsprivate final com.google.common.collect.ImmutableMap.Builder<Holder<Enchantment>, NumberProvider> SetEnchantmentsFunction.Builder.enchantmentsprivate final Map<Holder<Enchantment>, NumberProvider> SetEnchantmentsFunction.enchantmentsMethods in net.minecraft.world.level.storage.loot.functions with parameters of type EnchantmentModifier and TypeMethodDescriptionstatic LootItemConditionalFunction.Builder<?> ApplyBonusCount.addBonusBinomialDistributionCount(Enchantment p_79918_, float p_79919_, int p_79920_) static LootItemConditionalFunction.Builder<?> ApplyBonusCount.addOreBonusCount(Enchantment p_79916_) static LootItemConditionalFunction.Builder<?> ApplyBonusCount.addUniformBonusCount(Enchantment p_79940_) static LootItemConditionalFunction.Builder<?> ApplyBonusCount.addUniformBonusCount(Enchantment p_79922_, int p_79923_) private static ItemStackEnchantRandomlyFunction.enchantItem(ItemStack p_230980_, Enchantment p_230981_, RandomSource p_230982_) EnchantRandomlyFunction.Builder.withEnchantment(Enchantment p_80445_) SetEnchantmentsFunction.Builder.withEnchantment(Enchantment p_165375_, NumberProvider p_165376_) Constructor parameters in net.minecraft.world.level.storage.loot.functions with type arguments of type EnchantmentModifierConstructorDescriptionprivateApplyBonusCount(List<LootItemCondition> p_298532_, Holder<Enchantment> p_298797_, ApplyBonusCount.Formula p_79905_) (package private)EnchantRandomlyFunction(List<LootItemCondition> p_299014_, Optional<HolderSet<Enchantment>> p_298965_) (package private)SetEnchantmentsFunction(List<LootItemCondition> p_299192_, Map<Holder<Enchantment>, NumberProvider> p_165338_, boolean p_165339_) -
Uses of Enchantment in net.minecraft.world.level.storage.loot.predicates
Fields in net.minecraft.world.level.storage.loot.predicates with type parameters of type EnchantmentModifier and TypeFieldDescriptionprivate final Holder<Enchantment> BonusLevelTableCondition.enchantmentThe field for theenchantmentrecord component.Methods in net.minecraft.world.level.storage.loot.predicates that return types with arguments of type EnchantmentModifier and TypeMethodDescriptionBonusLevelTableCondition.enchantment()Returns the value of theenchantmentrecord component.Methods in net.minecraft.world.level.storage.loot.predicates with parameters of type EnchantmentModifier and TypeMethodDescriptionstatic LootItemCondition.BuilderBonusLevelTableCondition.bonusLevelFlatChance(Enchantment p_81518_, float... p_81519_) Constructor parameters in net.minecraft.world.level.storage.loot.predicates with type arguments of type EnchantmentModifierConstructorDescriptionBonusLevelTableCondition(Holder<Enchantment> enchantment, List<Float> values) Creates an instance of aBonusLevelTableConditionrecord class. -
Uses of Enchantment in net.neoforged.neoforge.common
Fields in net.neoforged.neoforge.common with type parameters of type EnchantmentModifier and TypeFieldDescriptionstatic final TagKey<Enchantment> Tags.Enchantments.ENTITY_AUXILIARY_MOVEMENT_ENHANCEMENTSFor enchantments that applies movement-based benefits unrelated to speed for the entity wearing armor enchanted with it.static final TagKey<Enchantment> Tags.Enchantments.ENTITY_DEFENSE_ENHANCEMENTSFor enchantments that decrease damage taken or otherwise benefit, in regard to damage, the entity wearing armor enchanted with it.static final TagKey<Enchantment> Tags.Enchantments.ENTITY_SPEED_ENHANCEMENTSFor enchantments that increase movement speed for entity wearing armor enchanted with it.static final TagKey<Enchantment> Tags.Enchantments.INCREASE_BLOCK_DROPSA tag containing enchantments that increase the amount or quality of drops from blocks, such asEnchantments.FORTUNE.static final TagKey<Enchantment> Tags.Enchantments.INCREASE_ENTITY_DROPSA tag containing enchantments that increase the amount or quality of drops from entities, such asEnchantments.LOOTING.static final TagKey<Enchantment> Tags.Enchantments.WEAPON_DAMAGE_ENHANCEMENTSFor enchantments that increase the damage dealt by an item.Methods in net.neoforged.neoforge.common that return types with arguments of type Enchantment -
Uses of Enchantment in net.neoforged.neoforge.common.data
Methods in net.neoforged.neoforge.common.data with parameters of type EnchantmentMethod parameters in net.neoforged.neoforge.common.data with type arguments of type EnchantmentModifier and TypeMethodDescriptionvoidLanguageProvider.addEnchantment(Supplier<? extends Enchantment> key, String name) -
Uses of Enchantment in net.neoforged.neoforge.common.extensions
Methods in net.neoforged.neoforge.common.extensions that return EnchantmentMethods in net.neoforged.neoforge.common.extensions with parameters of type EnchantmentModifier and TypeMethodDescriptiondefault booleanIItemExtension.canApplyAtEnchantingTable(ItemStack stack, Enchantment enchantment) Checks whether an item can be enchanted with a certain enchantment.default booleanIItemStackExtension.canApplyAtEnchantingTable(Enchantment enchantment) Checks whether an item can be enchanted with a certain enchantment.default intIItemExtension.getEnchantmentLevel(ItemStack stack, Enchantment enchantment) Gets the level of the enchantment currently present on the stack.default intIItemStackExtension.getEnchantmentLevel(Enchantment enchantment) Gets the gameplay level of the target enchantment on this stack. -
Uses of Enchantment in net.neoforged.neoforge.debug.loot
Fields in net.neoforged.neoforge.debug.loot with type parameters of type EnchantmentModifier and TypeFieldDescriptionprivate static final DeferredRegister<Enchantment> GlobalLootModifiersTest.ENCHANTSprivate static final DeferredHolder<Enchantment, Enchantment> GlobalLootModifiersTest.SMELTprivate static final DeferredHolder<Enchantment, Enchantment> GlobalLootModifiersTest.SMELT -
Uses of Enchantment in net.neoforged.neoforge.event
Methods in net.neoforged.neoforge.event with parameters of type EnchantmentModifier and TypeMethodDescriptionstatic intEventHooks.getEnchantmentLevelSpecific(int level, ItemStack stack, Enchantment ench) FiresGetEnchantmentLevelEventand for a single enchantment, returning the (possibly event-modified) level. -
Uses of Enchantment in net.neoforged.neoforge.event.enchanting
Fields in net.neoforged.neoforge.event.enchanting declared as EnchantmentModifier and TypeFieldDescriptionprotected final @Nullable EnchantmentGetEnchantmentLevelEvent.targetEnchantMethods in net.neoforged.neoforge.event.enchanting that return EnchantmentModifier and TypeMethodDescription@Nullable EnchantmentGetEnchantmentLevelEvent.getTargetEnchant()This method returns the specific enchantment being queried fromIItemStackExtension.getEnchantmentLevel(Enchantment).Methods in net.neoforged.neoforge.event.enchanting with parameters of type EnchantmentModifier and TypeMethodDescriptionbooleanGetEnchantmentLevelEvent.isTargetting(Enchantment ench) Helper method aroundGetEnchantmentLevelEvent.getTargetEnchant()that checks if the target is the specified enchantment, or if the target is null.Constructors in net.neoforged.neoforge.event.enchanting with parameters of type EnchantmentModifierConstructorDescriptionGetEnchantmentLevelEvent(ItemStack stack, ItemEnchantments.Mutable enchantments, @Nullable Enchantment targetEnchant)
IItemStackExtension.getEnchantmentLevel(Enchantment)for gameplay logic.