Uses of Class
net.minecraft.enchantment.Enchantment
Package
Description
-
Uses of Enchantment in net.minecraft.command.argument
Modifier and TypeMethodDescriptionstatic RegistryEntry.Reference
<Enchantment> RegistryEntryReferenceArgumentType.getEnchantment
(com.mojang.brigadier.context.CommandContext<ServerCommandSource> context, String name) -
Uses of Enchantment in net.minecraft.component.type
Modifier and TypeFieldDescriptionprivate final Object2IntOpenHashMap
<RegistryEntry<Enchantment>> ItemEnchantmentsComponent.Builder.enchantments
(package private) final Object2IntOpenHashMap
<RegistryEntry<Enchantment>> ItemEnchantmentsComponent.enchantments
private static final com.mojang.serialization.Codec
<Object2IntOpenHashMap<RegistryEntry<Enchantment>>> ItemEnchantmentsComponent.INLINE_CODEC
Modifier and TypeMethodDescriptionItemEnchantmentsComponent.Builder.getEnchantments()
ItemEnchantmentsComponent.getEnchantments()
ItemEnchantmentsComponent.getEnchantmentsMap()
Modifier and TypeMethodDescriptionvoid
ItemEnchantmentsComponent.Builder.add
(Enchantment enchantment, int level) int
ItemEnchantmentsComponent.Builder.getLevel
(Enchantment enchantment) int
ItemEnchantmentsComponent.getLevel
(Enchantment enchantment) void
ItemEnchantmentsComponent.Builder.set
(Enchantment enchantment, int level) Modifier and TypeMethodDescriptionvoid
ItemEnchantmentsComponent.Builder.remove
(Predicate<RegistryEntry<Enchantment>> predicate) ModifierConstructorDescription(package private)
ItemEnchantmentsComponent
(Object2IntOpenHashMap<RegistryEntry<Enchantment>> enchantments, boolean showInTooltip) -
Uses of Enchantment in net.minecraft.data.server.tag
Modifier and TypeMethodDescriptionprotected void
EnchantmentTagProvider.createTooltipOrderTag
(RegistryWrapper.WrapperLookup registryLookup, Enchantment[] enchantments) -
Uses of Enchantment in net.minecraft.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
EnchantmentLevelEntry.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 RegistryEntry.Reference
<Enchantment> Enchantment.registryEntry
Modifier and TypeMethodDescriptionstatic @Nullable Enchantment
Enchantment.byRawId
(int id) private static Enchantment
Enchantments.register
(String name, Enchantment enchantment) Modifier and TypeMethodDescriptionvoid
EnchantmentHelper.Consumer.accept
(Enchantment enchantment, int level) boolean
DamageEnchantment.canAccept
(Enchantment other) Returns whether this enchantment can exist on an item stack with theother
enchantment.boolean
DepthStriderEnchantment.canAccept
(Enchantment other) Returns whether this enchantment can exist on an item stack with theother
enchantment.protected boolean
Enchantment.canAccept
(Enchantment other) Returns whether this enchantment can exist on an item stack with theother
enchantment.boolean
FrostWalkerEnchantment.canAccept
(Enchantment other) Returns whether this enchantment can exist on an item stack with theother
enchantment.boolean
InfinityEnchantment.canAccept
(Enchantment other) Returns whether this enchantment can exist on an item stack with theother
enchantment.boolean
LuckEnchantment.canAccept
(Enchantment other) Returns whether this enchantment can exist on an item stack with theother
enchantment.boolean
MultishotEnchantment.canAccept
(Enchantment other) Returns whether this enchantment can exist on an item stack with theother
enchantment.boolean
PiercingEnchantment.canAccept
(Enchantment other) Returns whether this enchantment can exist on an item stack with theother
enchantment.boolean
ProtectionEnchantment.canAccept
(Enchantment other) Returns whether this enchantment can exist on an item stack with theother
enchantment.boolean
RiptideEnchantment.canAccept
(Enchantment other) Returns whether this enchantment can exist on an item stack with theother
enchantment.boolean
SilkTouchEnchantment.canAccept
(Enchantment other) Returns whether this enchantment can exist on an item stack with theother
enchantment.final boolean
Enchantment.canCombine
(Enchantment other) Returns whether this enchantment can exist on an item stack with theother
enchantment and theother
enchantment can exist with this enchantment.static Map.Entry
<EquipmentSlot, ItemStack> EnchantmentHelper.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> EnchantmentHelper.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 int
EnchantmentHelper.getEquipmentLevel
(Enchantment enchantment, LivingEntity entity) Returns the highest level of the passed enchantment in the enchantment's applicable equipment slots' item stacks.static int
EnchantmentHelper.getLevel
(Enchantment enchantment, ItemStack stack) Gets the level of an enchantment on an item stack.static boolean
EnchantmentHelper.isCompatible
(Collection<RegistryEntry<Enchantment>> existing, Enchantment candidate) Returns whether thecandidate
enchantment is compatible with theexisting
enchantments.private static Enchantment
Enchantments.register
(String name, Enchantment enchantment) Modifier and TypeMethodDescriptionstatic boolean
EnchantmentHelper.isCompatible
(Collection<RegistryEntry<Enchantment>> existing, Enchantment candidate) Returns whether thecandidate
enchantment is compatible with theexisting
enchantments. -
Uses of Enchantment in net.minecraft.item
Modifier and TypeMethodDescriptionvoid
ItemStack.addEnchantment
(Enchantment enchantment, int level) Enchants this item with the given enchantment and level.Modifier and TypeMethodDescriptionprivate static void
ItemGroups.addAllLevelEnchantedBooks
(ItemGroup.Entries entries, RegistryWrapper<Enchantment> registryWrapper, Set<TagKey<Item>> tags, ItemGroup.StackVisibility visibility, FeatureSet enabledFeatures) private static void
ItemGroups.addMaxLevelEnchantedBooks
(ItemGroup.Entries entries, RegistryWrapper<Enchantment> registryWrapper, Set<TagKey<Item>> tags, ItemGroup.StackVisibility visibility, FeatureSet enabledFeatures) -
Uses of Enchantment in net.minecraft.loot.condition
Modifier and TypeFieldDescriptionprivate final RegistryEntry
<Enchantment> TableBonusLootCondition.enchantment
The field for theenchantment
record component.Modifier and TypeMethodDescriptionTableBonusLootCondition.enchantment()
Returns the value of theenchantment
record component.Modifier and TypeMethodDescriptionstatic LootCondition.Builder
TableBonusLootCondition.builder
(Enchantment enchantment, float[] chances) ModifierConstructorDescriptionTableBonusLootCondition
(RegistryEntry<Enchantment> registryEntry, List<Float> list) -
Uses of Enchantment in net.minecraft.loot.function
Modifier and TypeFieldDescriptionprivate final RegistryEntry
<Enchantment> ApplyBonusLootFunction.enchantment
private static final com.mojang.serialization.Codec
<RegistryEntryList<Enchantment>> EnchantRandomlyLootFunction.ENCHANTMENT_LIST_CODEC
private final List
<RegistryEntry<Enchantment>> EnchantRandomlyLootFunction.Builder.enchantments
private final Optional
<RegistryEntryList<Enchantment>> EnchantRandomlyLootFunction.enchantments
private final ImmutableMap.Builder
<RegistryEntry<Enchantment>, LootNumberProvider> SetEnchantmentsLootFunction.Builder.enchantments
private final Map
<RegistryEntry<Enchantment>, LootNumberProvider> SetEnchantmentsLootFunction.enchantments
Modifier and TypeMethodDescriptionEnchantRandomlyLootFunction.Builder.add
(Enchantment enchantment) private static ItemStack
EnchantRandomlyLootFunction.addEnchantmentToStack
(ItemStack stack, Enchantment enchantment, Random random) static ConditionalLootFunction.Builder
<?> ApplyBonusLootFunction.binomialWithBonusCount
(Enchantment enchantment, float probability, int extra) SetEnchantmentsLootFunction.Builder.enchantment
(Enchantment enchantment, LootNumberProvider level) static ConditionalLootFunction.Builder
<?> ApplyBonusLootFunction.oreDrops
(Enchantment enchantment) static ConditionalLootFunction.Builder
<?> ApplyBonusLootFunction.uniformBonusCount
(Enchantment enchantment) static ConditionalLootFunction.Builder
<?> ApplyBonusLootFunction.uniformBonusCount
(Enchantment enchantment, int bonusMultiplier) ModifierConstructorDescriptionprivate
ApplyBonusLootFunction
(List<LootCondition> conditions, RegistryEntry<Enchantment> enchantment, ApplyBonusLootFunction.Formula formula) (package private)
EnchantRandomlyLootFunction
(List<LootCondition> conditions, Optional<RegistryEntryList<Enchantment>> enchantments) (package private)
SetEnchantmentsLootFunction
(List<LootCondition> conditions, Map<RegistryEntry<Enchantment>, LootNumberProvider> enchantments, boolean add) -
Uses of Enchantment in net.minecraft.predicate.item
Modifier and TypeFieldDescriptionprivate final Optional
<RegistryEntry<Enchantment>> EnchantmentPredicate.enchantment
The field for theenchantment
record component.Modifier and TypeMethodDescriptionEnchantmentPredicate.enchantment()
Returns the value of theenchantment
record component.ModifierConstructorDescriptionEnchantmentPredicate
(Enchantment enchantment, NumberRange.IntRange levels) ModifierConstructorDescriptionEnchantmentPredicate
(Optional<RegistryEntry<Enchantment>> optional, NumberRange.IntRange intRange) -
Uses of Enchantment in net.minecraft.registry
Modifier and TypeFieldDescriptionstatic final Registry
<Enchantment> Registries.ENCHANTMENT
static final RegistryKey
<Registry<Enchantment>> RegistryKeys.ENCHANTMENT
-
Uses of Enchantment in net.minecraft.registry.tag
-
Uses of Enchantment in net.minecraft.server.command
Modifier and TypeMethodDescriptionprivate static int
EnchantCommand.execute
(ServerCommandSource source, Collection<? extends Entity> targets, RegistryEntry<Enchantment> enchantment, int level) -
Uses of Enchantment in net.minecraft.village
Modifier and TypeFieldDescriptionprivate final List
<Enchantment> TradeOffers.EnchantBookFactory.possibleEnchantments
Modifier and TypeMethodDescriptionprivate Enchantment
TradeOffers.EnchantBookFactory.chooseEnchantment
(Random random, FeatureSet enabledFeatures) Modifier and TypeMethodDescriptionprivate static ItemStack
TradeOffers.enchant
(Item item, Enchantment enchantment, int level) ModifierConstructorDescriptionEnchantBookFactory
(int experience, int minLevel, int maxLevel, Enchantment[] possibleEnchantments) EnchantBookFactory
(int experience, Enchantment[] possibleEnchantments)