Uses of Class
net.minecraft.world.item.enchantment.ItemEnchantments
Package
Description
-
Uses of ItemEnchantments in net.minecraft.advancements.critereon
Modifier and TypeMethodDescriptionItemEnchantmentsPredicate.Enchantments.componentType()
ItemEnchantmentsPredicate.StoredEnchantments.componentType()
Modifier and TypeMethodDescriptionboolean
EnchantmentPredicate.containedIn
(ItemEnchantments p_330878_) boolean
ItemEnchantmentsPredicate.matches
(ItemStack p_333811_, ItemEnchantments p_334059_) private boolean
EnchantmentPredicate.matchesEnchantment
(ItemEnchantments p_346384_, Holder<Enchantment> p_345318_) -
Uses of ItemEnchantments in net.minecraft.core.component
Modifier and TypeFieldDescriptionstatic final DataComponentType
<ItemEnchantments> DataComponents.ENCHANTMENTS
static final DataComponentType
<ItemEnchantments> DataComponents.STORED_ENCHANTMENTS
-
Uses of ItemEnchantments in net.minecraft.world.item
Modifier and TypeMethodDescriptionItemStack.getEnchantments()
Deprecated.ItemStack.getTagEnchantments()
Gets all enchantments from NBT. -
Uses of ItemEnchantments in net.minecraft.world.item.enchantment
Modifier and TypeFieldDescriptionstatic final com.mojang.serialization.Codec
<ItemEnchantments> ItemEnchantments.CODEC
private static final com.mojang.serialization.Codec
<ItemEnchantments> ItemEnchantments.FULL_CODEC
static final StreamCodec
<RegistryFriendlyByteBuf, ItemEnchantments> ItemEnchantments.STREAM_CODEC
Modifier and TypeMethodDescriptionstatic ItemEnchantments
EnchantmentHelper.getEnchantmentsForCrafting
(ItemStack p_330538_) ItemEnchantments.Mutable.toImmutable()
static ItemEnchantments
EnchantmentHelper.updateEnchantments
(ItemStack p_331034_, Consumer<ItemEnchantments.Mutable> p_332031_) ItemEnchantments.withTooltip
(boolean p_335616_) Modifier and TypeMethodDescriptionprivate static DataComponentType
<ItemEnchantments> EnchantmentHelper.getComponentType
(ItemStack p_331909_) Modifier and TypeMethodDescriptionstatic void
EnchantmentHelper.setEnchantments
(ItemStack p_44867_, ItemEnchantments p_332148_) -
Uses of ItemEnchantments in net.neoforged.neoforge.common.extensions
Modifier and TypeMethodDescriptiondefault ItemEnchantments
IItemExtension.getAllEnchantments
(ItemStack stack, HolderLookup.RegistryLookup<Enchantment> lookup) Gets a map of all enchantments present on the stack.default ItemEnchantments
IItemStackExtension.getAllEnchantments
(HolderLookup.RegistryLookup<Enchantment> lookup) Gets the gameplay level of all enchantments on this stack. -
Uses of ItemEnchantments in net.neoforged.neoforge.event
Modifier and TypeMethodDescriptionstatic ItemEnchantments
EventHooks.getAllEnchantmentLevels
(ItemEnchantments enchantments, ItemStack stack, HolderLookup.RegistryLookup<Enchantment> lookup) FiresGetEnchantmentLevelEvent
and for all enchantments, returning the (possibly event-modified) enchantment map.Modifier and TypeMethodDescriptionstatic ItemEnchantments
EventHooks.getAllEnchantmentLevels
(ItemEnchantments enchantments, ItemStack stack, HolderLookup.RegistryLookup<Enchantment> lookup) FiresGetEnchantmentLevelEvent
and for all enchantments, returning the (possibly event-modified) enchantment map.
ItemStack.getTagEnchantments()
for NBT enchantments, orIItemStackExtension.getAllEnchantments(net.minecraft.core.HolderLookup.RegistryLookup<net.minecraft.world.item.enchantment.Enchantment>)
for gameplay.