Uses of Class
net.minecraft.world.item.enchantment.Enchantment
Package
Description
-
Uses of Enchantment in net.minecraft.advancements.critereon
Modifier and TypeFieldDescriptionprivate final Optional
<Holder<Enchantment>> EnchantmentPredicate.enchantment
The field for theenchantment
record component.Modifier and TypeMethodDescriptionEnchantmentPredicate.enchantment()
Returns the value of theenchantment
record component.ModifierConstructorDescriptionEnchantmentPredicate
(Enchantment p_30471_, MinMaxBounds.Ints p_30472_) ModifierConstructorDescriptionEnchantmentPredicate
(Optional<Holder<Enchantment>> enchantment, MinMaxBounds.Ints level) Creates an instance of aEnchantmentPredicate
record class. -
Uses of Enchantment in net.minecraft.commands.arguments
Modifier 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
Modifier and TypeFieldDescriptionstatic final Registry
<Enchantment> BuiltInRegistries.ENCHANTMENT
static final ResourceKey
<Registry<Enchantment>> Registries.ENCHANTMENT
-
Uses of Enchantment in net.minecraft.data.tags
Modifier and TypeMethodDescriptionprotected void
EnchantmentTagsProvider.tooltipOrder
(HolderLookup.Provider p_341105_, Enchantment... p_341174_) -
Uses of Enchantment in net.minecraft.server.commands
Modifier and TypeMethodDescriptionprivate static int
EnchantCommand.enchant
(CommandSourceStack p_249815_, Collection<? extends Entity> p_248848_, Holder<Enchantment> p_251252_, int p_249941_) -
Uses of Enchantment in net.minecraft.tags
-
Uses of Enchantment in net.minecraft.world.entity.npc
Modifier and TypeFieldDescriptionprivate final List
<Enchantment> VillagerTrades.EnchantBookForEmeralds.tradeableEnchantments
Modifier and TypeMethodDescriptionprivate Enchantment
VillagerTrades.EnchantBookForEmeralds.getEnchantment
(RandomSource p_342021_, FeatureFlagSet p_342019_) Modifier and TypeMethodDescriptionprivate static ItemStack
VillagerTrades.enchant
(Item p_301995_, Enchantment p_302009_, int p_302011_) ModifierConstructorDescriptionEnchantBookForEmeralds
(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
Modifier and TypeMethodDescriptionprivate static void
CreativeModeTabs.generateEnchantmentBookTypesAllLevels
(CreativeModeTab.Output p_270961_, HolderLookup<Enchantment> p_270628_, Set<TagKey<Item>> p_271024_, CreativeModeTab.TabVisibility p_270805_, FeatureFlagSet p_338625_) private static void
CreativeModeTabs.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
Modifier and TypeClassDescriptionclass
class
class
class
class
class
class
class
class
class
class
class
class
class
class
class
class
class
class
class
Modifier and TypeFieldDescriptionstatic final Enchantment
Enchantments.AQUA_AFFINITY
static final Enchantment
Enchantments.BANE_OF_ARTHROPODS
static final Enchantment
Enchantments.BINDING_CURSE
static final Enchantment
Enchantments.BLAST_PROTECTION
static final Enchantment
Enchantments.BREACH
static final Enchantment
Enchantments.CHANNELING
static final Enchantment
Enchantments.DENSITY
static final Enchantment
Enchantments.DEPTH_STRIDER
static final Enchantment
Enchantments.EFFICIENCY
final Enchantment
EnchantmentInstance.enchantment
static final Enchantment
Enchantments.FEATHER_FALLING
static final Enchantment
Enchantments.FIRE_ASPECT
static final Enchantment
Enchantments.FIRE_PROTECTION
static final Enchantment
Enchantments.FLAME
static final Enchantment
Enchantments.FORTUNE
static final Enchantment
Enchantments.FROST_WALKER
static final Enchantment
Enchantments.IMPALING
static final Enchantment
Enchantments.INFINITY
static final Enchantment
Enchantments.KNOCKBACK
static final Enchantment
Enchantments.LOOTING
static final Enchantment
Enchantments.LOYALTY
static final Enchantment
Enchantments.LUCK_OF_THE_SEA
static final Enchantment
Enchantments.LURE
static final Enchantment
Enchantments.MENDING
static final Enchantment
Enchantments.MULTISHOT
static final Enchantment
Enchantments.PIERCING
static final Enchantment
Enchantments.POWER
static final Enchantment
Enchantments.PROJECTILE_PROTECTION
static final Enchantment
Enchantments.PROTECTION
static final Enchantment
Enchantments.PUNCH
static final Enchantment
Enchantments.QUICK_CHARGE
static final Enchantment
Enchantments.RESPIRATION
static final Enchantment
Enchantments.RIPTIDE
static final Enchantment
Enchantments.SHARPNESS
static final Enchantment
Enchantments.SILK_TOUCH
static final Enchantment
Enchantments.SMITE
static final Enchantment
Enchantments.SOUL_SPEED
static final Enchantment
Enchantments.SWEEPING_EDGE
static final Enchantment
Enchantments.SWIFT_SNEAK
static final Enchantment
Enchantments.THORNS
static final Enchantment
Enchantments.UNBREAKING
static final Enchantment
Enchantments.VANISHING_CURSE
static final Enchantment
Enchantments.WIND_BURST
Modifier and TypeFieldDescriptionprivate final Holder.Reference
<Enchantment> Enchantment.builtInRegistryHolder
(package private) final it.unimi.dsi.fastutil.objects.Object2IntOpenHashMap
<Holder<Enchantment>> ItemEnchantments.enchantments
private final it.unimi.dsi.fastutil.objects.Object2IntOpenHashMap
<Holder<Enchantment>> ItemEnchantments.Mutable.enchantments
private static final com.mojang.serialization.Codec
<it.unimi.dsi.fastutil.objects.Object2IntOpenHashMap<Holder<Enchantment>>> ItemEnchantments.LEVELS_CODEC
Modifier and TypeMethodDescriptionstatic Enchantment
Enchantment.byId
(int p_44698_) private static Enchantment
Enchantments.register
(String p_44993_, Enchantment p_44994_) Modifier and TypeMethodDescriptionEnchantment.builtInRegistryHolder()
Deprecated.Set
<it.unimi.dsi.fastutil.objects.Object2IntMap.Entry<Holder<Enchantment>>> ItemEnchantments.entrySet()
ItemEnchantments.keySet()
ItemEnchantments.Mutable.keySet()
Modifier and TypeMethodDescriptionvoid
EnchantmentHelper.EnchantmentVisitor.accept
(Enchantment p_44945_, int p_44946_) boolean
ArrowInfiniteEnchantment.checkCompatibility
(Enchantment p_44590_) boolean
ArrowPiercingEnchantment.checkCompatibility
(Enchantment p_44608_) boolean
DamageEnchantment.checkCompatibility
(Enchantment p_44644_) protected boolean
Enchantment.checkCompatibility
(Enchantment p_44690_) boolean
FrostWalkerEnchantment.checkCompatibility
(Enchantment p_45024_) boolean
LootBonusEnchantment.checkCompatibility
(Enchantment p_45094_) boolean
MultiShotEnchantment.checkCompatibility
(Enchantment p_45113_) boolean
ProtectionEnchantment.checkCompatibility
(Enchantment p_45142_) boolean
TridentRiptideEnchantment.checkCompatibility
(Enchantment p_45256_) boolean
UntouchingEnchantment.checkCompatibility
(Enchantment p_45266_) boolean
WaterWalkerEnchantment.checkCompatibility
(Enchantment p_45286_) static int
EnchantmentHelper.getEnchantmentLevel
(Enchantment p_44837_, LivingEntity p_44838_) static int
EnchantmentHelper.getItemEnchantmentLevel
(Enchantment p_44844_, ItemStack p_44845_) Deprecated.int
ItemEnchantments.getLevel
(Enchantment p_330552_) int
ItemEnchantments.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 boolean
Enchantment.isCompatibleWith
(Enchantment p_44696_) static boolean
EnchantmentHelper.isEnchantmentCompatible
(Collection<Holder<Enchantment>> p_44860_, Enchantment p_44861_) private static Enchantment
Enchantments.register
(String p_44993_, Enchantment p_44994_) void
ItemEnchantments.Mutable.set
(Enchantment p_331872_, int p_330832_) void
ItemEnchantments.Mutable.upgrade
(Enchantment p_330536_, int p_331153_) Modifier and TypeMethodDescriptionstatic boolean
EnchantmentHelper.isEnchantmentCompatible
(Collection<Holder<Enchantment>> p_44860_, Enchantment p_44861_) void
ItemEnchantments.Mutable.removeIf
(Predicate<Holder<Enchantment>> p_332079_) ModifierConstructorDescription(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
Modifier and TypeFieldDescriptionprivate final Holder
<Enchantment> ApplyBonusCount.enchantment
private static final com.mojang.serialization.Codec
<HolderSet<Enchantment>> EnchantRandomlyFunction.ENCHANTMENT_SET_CODEC
private final List
<Holder<Enchantment>> EnchantRandomlyFunction.Builder.enchantments
private final Optional
<HolderSet<Enchantment>> EnchantRandomlyFunction.enchantments
private final com.google.common.collect.ImmutableMap.Builder
<Holder<Enchantment>, NumberProvider> SetEnchantmentsFunction.Builder.enchantments
private final Map
<Holder<Enchantment>, NumberProvider> SetEnchantmentsFunction.enchantments
Modifier 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 ItemStack
EnchantRandomlyFunction.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_) ModifierConstructorDescriptionprivate
ApplyBonusCount
(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
Modifier and TypeFieldDescriptionprivate final Holder
<Enchantment> BonusLevelTableCondition.enchantment
The field for theenchantment
record component.Modifier and TypeMethodDescriptionBonusLevelTableCondition.enchantment()
Returns the value of theenchantment
record component.Modifier and TypeMethodDescriptionstatic LootItemCondition.Builder
BonusLevelTableCondition.bonusLevelFlatChance
(Enchantment p_81518_, float... p_81519_) ModifierConstructorDescriptionBonusLevelTableCondition
(Holder<Enchantment> enchantment, List<Float> values) Creates an instance of aBonusLevelTableCondition
record class. -
Uses of Enchantment in net.neoforged.neoforge.common
Modifier and TypeFieldDescriptionstatic final TagKey
<Enchantment> Tags.Enchantments.ENTITY_AUXILIARY_MOVEMENT_ENHANCEMENTS
For 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_ENHANCEMENTS
For 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_ENHANCEMENTS
For enchantments that increase movement speed for entity wearing armor enchanted with it.static final TagKey
<Enchantment> Tags.Enchantments.INCREASE_BLOCK_DROPS
A tag containing enchantments that increase the amount or quality of drops from blocks, such asEnchantments.FORTUNE
.static final TagKey
<Enchantment> Tags.Enchantments.INCREASE_ENTITY_DROPS
A tag containing enchantments that increase the amount or quality of drops from entities, such asEnchantments.LOOTING
.static final TagKey
<Enchantment> Tags.Enchantments.WEAPON_DAMAGE_ENHANCEMENTS
For enchantments that increase the damage dealt by an item. -
Uses of Enchantment in net.neoforged.neoforge.common.data
Modifier and TypeMethodDescriptionvoid
LanguageProvider.addEnchantment
(Supplier<? extends Enchantment> key, String name) -
Uses of Enchantment in net.neoforged.neoforge.common.extensions
Modifier and TypeMethodDescriptiondefault boolean
IItemExtension.canApplyAtEnchantingTable
(ItemStack stack, Enchantment enchantment) Checks whether an item can be enchanted with a certain enchantment.default boolean
IItemStackExtension.canApplyAtEnchantingTable
(Enchantment enchantment) Checks whether an item can be enchanted with a certain enchantment.default int
IItemExtension.getEnchantmentLevel
(ItemStack stack, Enchantment enchantment) Gets the level of the enchantment currently present on the stack.default int
IItemStackExtension.getEnchantmentLevel
(Enchantment enchantment) Gets the gameplay level of the target enchantment on this stack. -
Uses of Enchantment in net.neoforged.neoforge.debug.loot
Modifier and TypeFieldDescriptionprivate static final DeferredRegister
<Enchantment> GlobalLootModifiersTest.ENCHANTS
private static final DeferredHolder
<Enchantment, Enchantment> GlobalLootModifiersTest.SMELT
private static final DeferredHolder
<Enchantment, Enchantment> GlobalLootModifiersTest.SMELT
-
Uses of Enchantment in net.neoforged.neoforge.event
Modifier and TypeMethodDescriptionstatic int
EventHooks.getEnchantmentLevelSpecific
(int level, ItemStack stack, Enchantment ench) FiresGetEnchantmentLevelEvent
and for a single enchantment, returning the (possibly event-modified) level. -
Uses of Enchantment in net.neoforged.neoforge.event.enchanting
Modifier and TypeFieldDescriptionprotected final @Nullable Enchantment
GetEnchantmentLevelEvent.targetEnchant
Modifier and TypeMethodDescription@Nullable Enchantment
GetEnchantmentLevelEvent.getTargetEnchant()
This method returns the specific enchantment being queried fromIItemStackExtension.getEnchantmentLevel(Enchantment)
.Modifier and TypeMethodDescriptionboolean
GetEnchantmentLevelEvent.isTargetting
(Enchantment ench) Helper method aroundGetEnchantmentLevelEvent.getTargetEnchant()
that checks if the target is the specified enchantment, or if the target is null.ModifierConstructorDescriptionGetEnchantmentLevelEvent
(ItemStack stack, ItemEnchantments.Mutable enchantments, @Nullable Enchantment targetEnchant)
IItemStackExtension.getEnchantmentLevel(Enchantment)
for gameplay logic.