Uses of Class
net.minecraft.enchantment.Enchantment
Packages that use Enchantment
Package
Description
-
Uses of Enchantment in net.minecraft.command.argument
Methods in net.minecraft.command.argument that return types with arguments of type EnchantmentModifier and TypeMethodDescriptionstatic RegistryEntry.Reference<Enchantment> RegistryEntryReferenceArgumentType.getEnchantment(com.mojang.brigadier.context.CommandContext<ServerCommandSource> context, String name) -
Uses of Enchantment in net.minecraft.component.type
Fields in net.minecraft.component.type with type parameters of type EnchantmentModifier and TypeFieldDescriptionprivate final Object2IntOpenHashMap<RegistryEntry<Enchantment>> ItemEnchantmentsComponent.Builder.enchantments(package private) final Object2IntOpenHashMap<RegistryEntry<Enchantment>> ItemEnchantmentsComponent.enchantmentsprivate static final com.mojang.serialization.Codec<Object2IntOpenHashMap<RegistryEntry<Enchantment>>> ItemEnchantmentsComponent.INLINE_CODECMethods in net.minecraft.component.type that return types with arguments of type EnchantmentModifier and TypeMethodDescriptionItemEnchantmentsComponent.Builder.getEnchantments()ItemEnchantmentsComponent.getEnchantments()ItemEnchantmentsComponent.getEnchantmentsMap()Methods in net.minecraft.component.type with parameters of type EnchantmentModifier and TypeMethodDescriptionvoidItemEnchantmentsComponent.Builder.add(Enchantment enchantment, int level) intItemEnchantmentsComponent.Builder.getLevel(Enchantment enchantment) intItemEnchantmentsComponent.getLevel(Enchantment enchantment) voidItemEnchantmentsComponent.Builder.set(Enchantment enchantment, int level) Method parameters in net.minecraft.component.type with type arguments of type EnchantmentModifier and TypeMethodDescriptionvoidItemEnchantmentsComponent.Builder.remove(Predicate<RegistryEntry<Enchantment>> predicate) Constructor parameters in net.minecraft.component.type with type arguments of type EnchantmentModifierConstructorDescription(package private)ItemEnchantmentsComponent(Object2IntOpenHashMap<RegistryEntry<Enchantment>> enchantments, boolean showInTooltip) -
Uses of Enchantment in net.minecraft.data.server.tag
Methods in net.minecraft.data.server.tag with parameters of type EnchantmentModifier and TypeMethodDescriptionprotected voidEnchantmentTagProvider.createTooltipOrderTag(RegistryWrapper.WrapperLookup registryLookup, Enchantment[] enchantments) -
Uses of Enchantment in net.minecraft.enchantment
Subclasses of Enchantment in net.minecraft.enchantmentModifier and TypeClassDescriptionclassclassclassclassclassclassclassclassclassclassclassclassclassclassclassclassclassclassclassclassFields in net.minecraft.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 EnchantmentEnchantmentLevelEntry.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.enchantment with type parameters of type EnchantmentModifier and TypeFieldDescriptionprivate final RegistryEntry.Reference<Enchantment> Enchantment.registryEntryMethods in net.minecraft.enchantment that return EnchantmentModifier and TypeMethodDescriptionstatic @Nullable EnchantmentEnchantment.byRawId(int id) private static EnchantmentEnchantments.register(String name, Enchantment enchantment) Methods in net.minecraft.enchantment that return types with arguments of type EnchantmentMethods in net.minecraft.enchantment with parameters of type EnchantmentModifier and TypeMethodDescriptionvoidEnchantmentHelper.Consumer.accept(Enchantment enchantment, int level) booleanDamageEnchantment.canAccept(Enchantment other) Returns whether this enchantment can exist on an item stack with theotherenchantment.booleanDepthStriderEnchantment.canAccept(Enchantment other) Returns whether this enchantment can exist on an item stack with theotherenchantment.protected booleanEnchantment.canAccept(Enchantment other) Returns whether this enchantment can exist on an item stack with theotherenchantment.booleanFrostWalkerEnchantment.canAccept(Enchantment other) Returns whether this enchantment can exist on an item stack with theotherenchantment.booleanInfinityEnchantment.canAccept(Enchantment other) Returns whether this enchantment can exist on an item stack with theotherenchantment.booleanLuckEnchantment.canAccept(Enchantment other) Returns whether this enchantment can exist on an item stack with theotherenchantment.booleanMultishotEnchantment.canAccept(Enchantment other) Returns whether this enchantment can exist on an item stack with theotherenchantment.booleanPiercingEnchantment.canAccept(Enchantment other) Returns whether this enchantment can exist on an item stack with theotherenchantment.booleanProtectionEnchantment.canAccept(Enchantment other) Returns whether this enchantment can exist on an item stack with theotherenchantment.booleanRiptideEnchantment.canAccept(Enchantment other) Returns whether this enchantment can exist on an item stack with theotherenchantment.booleanSilkTouchEnchantment.canAccept(Enchantment other) Returns whether this enchantment can exist on an item stack with theotherenchantment.final booleanEnchantment.canCombine(Enchantment other) Returns whether this enchantment can exist on an item stack with theotherenchantment and theotherenchantment 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 intEnchantmentHelper.getEquipmentLevel(Enchantment enchantment, LivingEntity entity) Returns the highest level of the passed enchantment in the enchantment's applicable equipment slots' item stacks.static intEnchantmentHelper.getLevel(Enchantment enchantment, ItemStack stack) Gets the level of an enchantment on an item stack.static booleanEnchantmentHelper.isCompatible(Collection<RegistryEntry<Enchantment>> existing, Enchantment candidate) Returns whether thecandidateenchantment is compatible with theexistingenchantments.private static EnchantmentEnchantments.register(String name, Enchantment enchantment) Method parameters in net.minecraft.enchantment with type arguments of type EnchantmentModifier and TypeMethodDescriptionstatic booleanEnchantmentHelper.isCompatible(Collection<RegistryEntry<Enchantment>> existing, Enchantment candidate) Returns whether thecandidateenchantment is compatible with theexistingenchantments.Constructors in net.minecraft.enchantment with parameters of type Enchantment -
Uses of Enchantment in net.minecraft.item
Methods in net.minecraft.item with parameters of type EnchantmentModifier and TypeMethodDescriptionvoidItemStack.addEnchantment(Enchantment enchantment, int level) Enchants this item with the given enchantment and level.Method parameters in net.minecraft.item with type arguments of type EnchantmentModifier and TypeMethodDescriptionprivate static voidItemGroups.addAllLevelEnchantedBooks(ItemGroup.Entries entries, RegistryWrapper<Enchantment> registryWrapper, Set<TagKey<Item>> tags, ItemGroup.StackVisibility visibility, FeatureSet enabledFeatures) private static voidItemGroups.addMaxLevelEnchantedBooks(ItemGroup.Entries entries, RegistryWrapper<Enchantment> registryWrapper, Set<TagKey<Item>> tags, ItemGroup.StackVisibility visibility, FeatureSet enabledFeatures) -
Uses of Enchantment in net.minecraft.loot.condition
Fields in net.minecraft.loot.condition with type parameters of type EnchantmentModifier and TypeFieldDescriptionprivate final RegistryEntry<Enchantment> TableBonusLootCondition.enchantmentThe field for theenchantmentrecord component.Methods in net.minecraft.loot.condition that return types with arguments of type EnchantmentModifier and TypeMethodDescriptionTableBonusLootCondition.enchantment()Returns the value of theenchantmentrecord component.Methods in net.minecraft.loot.condition with parameters of type EnchantmentModifier and TypeMethodDescriptionstatic LootCondition.BuilderTableBonusLootCondition.builder(Enchantment enchantment, float[] chances) Constructor parameters in net.minecraft.loot.condition with type arguments of type EnchantmentModifierConstructorDescriptionTableBonusLootCondition(RegistryEntry<Enchantment> registryEntry, List<Float> list) -
Uses of Enchantment in net.minecraft.loot.function
Fields in net.minecraft.loot.function with type parameters of type EnchantmentModifier and TypeFieldDescriptionprivate final RegistryEntry<Enchantment> ApplyBonusLootFunction.enchantmentprivate static final com.mojang.serialization.Codec<RegistryEntryList<Enchantment>> EnchantRandomlyLootFunction.ENCHANTMENT_LIST_CODECprivate final List<RegistryEntry<Enchantment>> EnchantRandomlyLootFunction.Builder.enchantmentsprivate final Optional<RegistryEntryList<Enchantment>> EnchantRandomlyLootFunction.enchantmentsprivate final ImmutableMap.Builder<RegistryEntry<Enchantment>, LootNumberProvider> SetEnchantmentsLootFunction.Builder.enchantmentsprivate final Map<RegistryEntry<Enchantment>, LootNumberProvider> SetEnchantmentsLootFunction.enchantmentsMethods in net.minecraft.loot.function with parameters of type EnchantmentModifier and TypeMethodDescriptionEnchantRandomlyLootFunction.Builder.add(Enchantment enchantment) private static ItemStackEnchantRandomlyLootFunction.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) Constructor parameters in net.minecraft.loot.function with type arguments of type EnchantmentModifierConstructorDescriptionprivateApplyBonusLootFunction(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
Fields in net.minecraft.predicate.item with type parameters of type EnchantmentModifier and TypeFieldDescriptionprivate final Optional<RegistryEntry<Enchantment>> EnchantmentPredicate.enchantmentThe field for theenchantmentrecord component.Methods in net.minecraft.predicate.item that return types with arguments of type EnchantmentModifier and TypeMethodDescriptionEnchantmentPredicate.enchantment()Returns the value of theenchantmentrecord component.Constructors in net.minecraft.predicate.item with parameters of type EnchantmentModifierConstructorDescriptionEnchantmentPredicate(Enchantment enchantment, NumberRange.IntRange levels) Constructor parameters in net.minecraft.predicate.item with type arguments of type EnchantmentModifierConstructorDescriptionEnchantmentPredicate(Optional<RegistryEntry<Enchantment>> optional, NumberRange.IntRange intRange) -
Uses of Enchantment in net.minecraft.registry
Fields in net.minecraft.registry with type parameters of type EnchantmentModifier and TypeFieldDescriptionstatic final Registry<Enchantment> Registries.ENCHANTMENTstatic final RegistryKey<Registry<Enchantment>> RegistryKeys.ENCHANTMENT -
Uses of Enchantment in net.minecraft.registry.tag
Fields in net.minecraft.registry.tag with type parameters of type EnchantmentMethods in net.minecraft.registry.tag that return types with arguments of type Enchantment -
Uses of Enchantment in net.minecraft.server.command
Method parameters in net.minecraft.server.command with type arguments of type EnchantmentModifier and TypeMethodDescriptionprivate static intEnchantCommand.execute(ServerCommandSource source, Collection<? extends Entity> targets, RegistryEntry<Enchantment> enchantment, int level) -
Uses of Enchantment in net.minecraft.village
Fields in net.minecraft.village with type parameters of type EnchantmentModifier and TypeFieldDescriptionprivate final List<Enchantment> TradeOffers.EnchantBookFactory.possibleEnchantmentsMethods in net.minecraft.village that return EnchantmentModifier and TypeMethodDescriptionprivate EnchantmentTradeOffers.EnchantBookFactory.chooseEnchantment(Random random, FeatureSet enabledFeatures) Methods in net.minecraft.village with parameters of type EnchantmentModifier and TypeMethodDescriptionprivate static ItemStackTradeOffers.enchant(Item item, Enchantment enchantment, int level) Constructors in net.minecraft.village with parameters of type EnchantmentModifierConstructorDescriptionEnchantBookFactory(int experience, int minLevel, int maxLevel, Enchantment[] possibleEnchantments) EnchantBookFactory(int experience, Enchantment[] possibleEnchantments)