Uses of Record Class
net.minecraft.enchantment.Enchantment
Packages that use Enchantment
Package
Description
The base package for all Minecraft classes.
-
Uses of Enchantment in net.minecraft
Fields in net.minecraft with type parameters of type EnchantmentModifier and TypeFieldDescriptionprivate final RegistryEntry<Enchantment> class_9745.enchantmentThe field for theenchantmentrecord component.private final RegistryEntryList<Enchantment> class_9743.enchantmentsThe field for theenchantmentsrecord component.private final RegistryEntryList<Enchantment> class_9744.enchantmentsThe field for theenchantmentsrecord component.Methods in net.minecraft that return types with arguments of type EnchantmentModifier and TypeMethodDescriptionclass_9745.enchantment()Returns the value of theenchantmentrecord component.class_9743.enchantments()Returns the value of theenchantmentsrecord component.class_9744.enchantments()Returns the value of theenchantmentsrecord component.Constructor parameters in net.minecraft with type arguments of type EnchantmentModifierConstructorDescriptionclass_9743(RegistryEntryList<Enchantment> registryEntryList, IntProvider intProvider) class_9744(RegistryEntryList<Enchantment> registryEntryList, int int2, int int3) class_9745(RegistryEntry<Enchantment> registryEntry, IntProvider intProvider) -
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()Method parameters in net.minecraft.component.type with type arguments of type EnchantmentModifier and TypeMethodDescriptionvoidItemEnchantmentsComponent.Builder.add(RegistryEntry<Enchantment> registryEntry, int level) intItemEnchantmentsComponent.Builder.getLevel(RegistryEntry<Enchantment> registryEntry) intItemEnchantmentsComponent.getLevel(RegistryEntry<Enchantment> registryEntry) voidItemEnchantmentsComponent.Builder.remove(Predicate<RegistryEntry<Enchantment>> predicate) voidItemEnchantmentsComponent.Builder.set(RegistryEntry<Enchantment> registryEntry, int level) 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.loottable.vanilla
Method parameters in net.minecraft.data.server.loottable.vanilla with type arguments of type EnchantmentModifier and TypeMethodDescriptionstatic LootTable.BuilderVanillaEquipmentLootTableGenerator.method_60419(Item item, Item item2, ArmorTrim armorTrim, RegistryWrapper.Impl<Enchantment> impl) -
Uses of Enchantment in net.minecraft.enchantment
Fields in net.minecraft.enchantment with type parameters of type EnchantmentModifier and TypeFieldDescriptionstatic final RegistryKey<Enchantment> Enchantments.AQUA_AFFINITYstatic final RegistryKey<Enchantment> Enchantments.BANE_OF_ARTHROPODSstatic final RegistryKey<Enchantment> Enchantments.BINDING_CURSEstatic final RegistryKey<Enchantment> Enchantments.BLAST_PROTECTIONstatic final RegistryKey<Enchantment> Enchantments.BREACHstatic final RegistryKey<Enchantment> Enchantments.CHANNELINGstatic final RegistryKey<Enchantment> Enchantments.DENSITYstatic final RegistryKey<Enchantment> Enchantments.DEPTH_STRIDERstatic final RegistryKey<Enchantment> Enchantments.EFFICIENCYfinal RegistryEntry<Enchantment> EnchantmentLevelEntry.enchantmentprivate final RegistryEntryList<Enchantment> Enchantment.exclusiveSetThe field for theexclusiveSetrecord component.static final RegistryKey<Enchantment> Enchantments.FEATHER_FALLINGstatic final com.mojang.serialization.Codec<Enchantment> Enchantment.field_51643static final com.mojang.serialization.Codec<RegistryEntry<Enchantment>> Enchantment.field_51644private RegistryEntryList<Enchantment> Enchantment.class_9700.field_51646static final RegistryKey<Enchantment> Enchantments.FIRE_ASPECTstatic final RegistryKey<Enchantment> Enchantments.FIRE_PROTECTIONstatic final RegistryKey<Enchantment> Enchantments.FLAMEstatic final RegistryKey<Enchantment> Enchantments.FORTUNEstatic final RegistryKey<Enchantment> Enchantments.FROST_WALKERstatic final RegistryKey<Enchantment> Enchantments.IMPALINGstatic final RegistryKey<Enchantment> Enchantments.INFINITYstatic final RegistryKey<Enchantment> Enchantments.KNOCKBACKstatic final RegistryKey<Enchantment> Enchantments.LOOTINGstatic final RegistryKey<Enchantment> Enchantments.LOYALTYstatic final RegistryKey<Enchantment> Enchantments.LUCK_OF_THE_SEAstatic final RegistryKey<Enchantment> Enchantments.LUREstatic final RegistryKey<Enchantment> Enchantments.MENDINGstatic final RegistryKey<Enchantment> Enchantments.MULTISHOTstatic final RegistryKey<Enchantment> Enchantments.PIERCINGstatic final RegistryKey<Enchantment> Enchantments.POWERstatic final RegistryKey<Enchantment> Enchantments.PROJECTILE_PROTECTIONstatic final RegistryKey<Enchantment> Enchantments.PROTECTIONstatic final RegistryKey<Enchantment> Enchantments.PUNCHstatic final RegistryKey<Enchantment> Enchantments.QUICK_CHARGEstatic final RegistryKey<Enchantment> Enchantments.RESPIRATIONstatic final RegistryKey<Enchantment> Enchantments.RIPTIDEstatic final RegistryKey<Enchantment> Enchantments.SHARPNESSstatic final RegistryKey<Enchantment> Enchantments.SILK_TOUCHstatic final RegistryKey<Enchantment> Enchantments.SMITEstatic final RegistryKey<Enchantment> Enchantments.SOUL_SPEEDstatic final RegistryKey<Enchantment> Enchantments.SWEEPING_EDGEstatic final RegistryKey<Enchantment> Enchantments.SWIFT_SNEAKstatic final RegistryKey<Enchantment> Enchantments.THORNSstatic final RegistryKey<Enchantment> Enchantments.UNBREAKINGstatic final RegistryKey<Enchantment> Enchantments.VANISHING_CURSEstatic final RegistryKey<Enchantment> Enchantments.WIND_BURSTMethods in net.minecraft.enchantment that return EnchantmentMethods in net.minecraft.enchantment that return types with arguments of type EnchantmentModifier and TypeMethodDescriptionEnchantment.exclusiveSet()Returns the value of theexclusiveSetrecord component.private static RegistryKey<Enchantment> Enchantments.method_60183(String string) Method parameters in net.minecraft.enchantment with type arguments of type EnchantmentModifier and TypeMethodDescriptionvoidEnchantmentHelper.class_9702.accept(RegistryEntry<Enchantment> registryEntry, int int2, class_9699 class_9699) voidEnchantmentHelper.Consumer.accept(RegistryEntry<Enchantment> registryEntry, int level) static ItemStackEnchantmentHelper.enchant(Random random, ItemStack itemStack, int int2, Stream<RegistryEntry<Enchantment>> stream) Enchants thetargetitem stack and returns it.static List<EnchantmentLevelEntry> EnchantmentHelper.generateEnchantments(Random random, ItemStack itemStack, int int2, Stream<RegistryEntry<Enchantment>> stream) Generate the enchantments for enchanting thestack.static intEnchantmentHelper.getEquipmentLevel(RegistryEntry<Enchantment> registryEntry, LivingEntity entity) Returns the highest level of the passed enchantment in the enchantment's applicable equipment slots' item stacks.static intEnchantmentHelper.getLevel(RegistryEntry<Enchantment> registryEntry, ItemStack stack) Gets the level of an enchantment on an item stack.static TextEnchantment.getName(RegistryEntry<Enchantment> registryEntry, int level) static List<EnchantmentLevelEntry> EnchantmentHelper.getPossibleEntries(int int2, ItemStack itemStack, Stream<RegistryEntry<Enchantment>> stream) Gets all the possible entries for enchanting thestackat the givenpower.static booleanEnchantmentHelper.isCompatible(Collection<RegistryEntry<Enchantment>> existing, RegistryEntry<Enchantment> registryEntry) Returns whether thecandidateenchantment is compatible with theexistingenchantments.static booleanEnchantmentHelper.isCompatible(Collection<RegistryEntry<Enchantment>> existing, RegistryEntry<Enchantment> registryEntry) Returns whether thecandidateenchantment is compatible with theexistingenchantments.static booleanEnchantment.method_60033(RegistryEntry<Enchantment> registryEntry, RegistryEntry<Enchantment> registryEntry2) Enchantment.class_9700.method_60061(RegistryEntryList<Enchantment> registryEntryList) static ItemStackEnchantmentHelper.method_60133(Random random, ItemStack itemStack, int int2, DynamicRegistryManager dynamicRegistryManager, Optional<? extends RegistryEntryList<Enchantment>> optional) static booleanEnchantmentHelper.method_60138(ItemStack itemStack, TagKey<Enchantment> tagKey) static voidEnchantments.method_60184(Registerable<Enchantment> registerable) private static voidEnchantments.register(Registerable<Enchantment> registerable, RegistryKey<Enchantment> registryKey, Enchantment.class_9700 class_9700) private static voidEnchantments.register(Registerable<Enchantment> registerable, RegistryKey<Enchantment> registryKey, Enchantment.class_9700 class_9700) Constructor parameters in net.minecraft.enchantment with type arguments of type EnchantmentModifierConstructorDescriptionEnchantment(Text text, Enchantment.Properties properties, RegistryEntryList<Enchantment> registryEntryList, ComponentMap componentMap) EnchantmentLevelEntry(RegistryEntry<Enchantment> registryEntry, int level) -
Uses of Enchantment in net.minecraft.entity
Fields in net.minecraft.entity with type parameters of type EnchantmentModifier and TypeFieldDescriptionprivate final Reference2ObjectMap<Enchantment, Set<class_9722>> LivingEntity.field_51571Methods in net.minecraft.entity that return types with arguments of type Enchantment -
Uses of Enchantment in net.minecraft.item
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) voidItemStack.addEnchantment(RegistryEntry<Enchantment> registryEntry, int level) Enchants this item with the given enchantment and level.private static voidItemGroups.addMaxLevelEnchantedBooks(ItemGroup.Entries entries, RegistryWrapper<Enchantment> registryWrapper, Set<TagKey<Item>> tags, ItemGroup.StackVisibility visibility) -
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> RandomChanceWithLootingLootCondition.enchantmentThe field for theenchantmentrecord component.private final RegistryEntry<Enchantment> TableBonusLootCondition.enchantmentThe field for theenchantmentrecord component.Methods in net.minecraft.loot.condition that return types with arguments of type EnchantmentModifier and TypeMethodDescriptionRandomChanceWithLootingLootCondition.enchantment()Returns the value of theenchantmentrecord component.TableBonusLootCondition.enchantment()Returns the value of theenchantmentrecord component.Method parameters in net.minecraft.loot.condition with type arguments of type EnchantmentModifier and TypeMethodDescriptionstatic LootCondition.BuilderTableBonusLootCondition.builder(RegistryEntry<Enchantment> registryEntry, float[] chances) Constructor parameters in net.minecraft.loot.condition with type arguments of type EnchantmentModifierConstructorDescriptionRandomChanceWithLootingLootCondition(class_9704 class_9704, RegistryEntry<Enchantment> registryEntry) TableBonusLootCondition(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 final ImmutableMap.Builder<RegistryEntry<Enchantment>, LootNumberProvider> SetEnchantmentsLootFunction.Builder.enchantmentsprivate final Map<RegistryEntry<Enchantment>, LootNumberProvider> SetEnchantmentsLootFunction.enchantmentsprivate final Optional<RegistryEntryList<Enchantment>> EnchantRandomlyLootFunction.field_51792private Optional<RegistryEntryList<Enchantment>> EnchantRandomlyLootFunction.Builder.field_51794private final Optional<RegistryEntryList<Enchantment>> EnchantWithLevelsLootFunction.field_51796private Optional<RegistryEntryList<Enchantment>> EnchantWithLevelsLootFunction.Builder.field_51797private final RegistryEntry<Enchantment> LootingEnchantLootFunction.field_51798private final RegistryEntry<Enchantment> LootingEnchantLootFunction.Builder.field_51799Method parameters in net.minecraft.loot.function with type arguments of type EnchantmentModifier and TypeMethodDescriptionEnchantRandomlyLootFunction.Builder.add(RegistryEntry<Enchantment> registryEntry) private static ItemStackEnchantRandomlyLootFunction.addEnchantmentToStack(ItemStack stack, RegistryEntry<Enchantment> registryEntry, Random random) static ConditionalLootFunction.Builder<?> ApplyBonusLootFunction.binomialWithBonusCount(RegistryEntry<Enchantment> registryEntry, float probability, int extra) SetEnchantmentsLootFunction.Builder.enchantment(RegistryEntry<Enchantment> registryEntry, LootNumberProvider level) EnchantRandomlyLootFunction.Builder.method_60293(RegistryEntryList<Enchantment> registryEntryList) EnchantWithLevelsLootFunction.Builder.method_60295(RegistryEntryList<Enchantment> registryEntryList) static ConditionalLootFunction.Builder<?> ApplyBonusLootFunction.oreDrops(RegistryEntry<Enchantment> registryEntry) static ConditionalLootFunction.Builder<?> ApplyBonusLootFunction.uniformBonusCount(RegistryEntry<Enchantment> registryEntry) static ConditionalLootFunction.Builder<?> ApplyBonusLootFunction.uniformBonusCount(RegistryEntry<Enchantment> registryEntry, int bonusMultiplier) Constructor parameters in net.minecraft.loot.function with type arguments of type EnchantmentModifierConstructorDescriptionprivateApplyBonusLootFunction(List<LootCondition> conditions, RegistryEntry<Enchantment> enchantment, ApplyBonusLootFunction.Formula formula) Builder(RegistryEntry<Enchantment> registryEntry, LootNumberProvider lootNumberProvider) (package private)EnchantRandomlyLootFunction(List<LootCondition> conditions, Optional<RegistryEntryList<Enchantment>> enchantments, boolean bool) (package private)EnchantWithLevelsLootFunction(List<LootCondition> conditions, LootNumberProvider range, Optional<RegistryEntryList<Enchantment>> optional) (package private)LootingEnchantLootFunction(List<LootCondition> conditions, RegistryEntry<Enchantment> registryEntry, LootNumberProvider lootNumberProvider, int int2) (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<RegistryEntryList<Enchantment>> EnchantmentPredicate.enchantmentsThe field for theenchantmentsrecord component.Methods in net.minecraft.predicate.item that return types with arguments of type EnchantmentModifier and TypeMethodDescriptionEnchantmentPredicate.enchantments()Returns the value of theenchantmentsrecord component.Method parameters in net.minecraft.predicate.item with type arguments of type EnchantmentModifier and TypeMethodDescriptionprivate booleanEnchantmentPredicate.method_59916(ItemEnchantmentsComponent itemEnchantmentsComponent, RegistryEntry<Enchantment> registryEntry) Constructor parameters in net.minecraft.predicate.item with type arguments of type EnchantmentModifierConstructorDescriptionEnchantmentPredicate(Optional<RegistryEntryList<Enchantment>> optional, NumberRange.IntRange intRange) EnchantmentPredicate(RegistryEntry<Enchantment> registryEntry, NumberRange.IntRange intRange) EnchantmentPredicate(RegistryEntryList<Enchantment> registryEntryList, NumberRange.IntRange intRange) -
Uses of Enchantment in net.minecraft.registry
Fields in net.minecraft.registry with type parameters of type EnchantmentModifier and TypeFieldDescriptionstatic 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 EnchantmentModifier and TypeFieldDescriptionstatic final TagKey<Enchantment> EnchantmentTags.ARMOR_EXCLUSIVE_SETstatic final TagKey<Enchantment> EnchantmentTags.BOOTS_EXCLUSIVE_SETstatic final TagKey<Enchantment> EnchantmentTags.BOW_EXCLUSIVE_SETstatic final TagKey<Enchantment> EnchantmentTags.CROSSBOW_EXCLUSIVE_SETstatic final TagKey<Enchantment> EnchantmentTags.CURSEstatic final TagKey<Enchantment> EnchantmentTags.DAMAGE_EXCLUSIVE_SETstatic final TagKey<Enchantment> EnchantmentTags.DESERT_COMMON_TRADEstatic final TagKey<Enchantment> EnchantmentTags.DESERT_SPECIAL_TRADEstatic final TagKey<Enchantment> EnchantmentTags.DOUBLE_TRADE_PRICEstatic final TagKey<Enchantment> EnchantmentTags.IN_ENCHANTING_TABLEstatic final TagKey<Enchantment> EnchantmentTags.JUNGLE_COMMON_TRADEstatic final TagKey<Enchantment> EnchantmentTags.JUNGLE_SPECIAL_TRADEstatic final TagKey<Enchantment> EnchantmentTags.MINING_EXCLUSIVE_SETstatic final TagKey<Enchantment> EnchantmentTags.NON_TREASUREstatic final TagKey<Enchantment> EnchantmentTags.ON_MOB_SPAWN_EQUIPMENTstatic final TagKey<Enchantment> EnchantmentTags.ON_RANDOM_LOOTstatic final TagKey<Enchantment> EnchantmentTags.ON_TRADED_EQUIPMENTstatic final TagKey<Enchantment> EnchantmentTags.PLAINS_COMMON_TRADEstatic final TagKey<Enchantment> EnchantmentTags.PLAINS_SPECIAL_TRADEstatic final TagKey<Enchantment> EnchantmentTags.PREVENTS_BEE_SPAWNS_WHEN_MININGstatic final TagKey<Enchantment> EnchantmentTags.PREVENTS_DECORATED_POT_SHATTERINGstatic final TagKey<Enchantment> EnchantmentTags.PREVENTS_ICE_MELTINGstatic final TagKey<Enchantment> EnchantmentTags.PREVENTS_INFESTED_SPAWNSstatic final TagKey<Enchantment> EnchantmentTags.RIPTIDE_EXCLUSIVE_SETstatic final TagKey<Enchantment> EnchantmentTags.SAVANNA_COMMON_TRADEstatic final TagKey<Enchantment> EnchantmentTags.SAVANNA_SPECIAL_TRADEstatic final TagKey<Enchantment> EnchantmentTags.SMELTS_LOOTstatic final TagKey<Enchantment> EnchantmentTags.SNOW_COMMON_TRADEstatic final TagKey<Enchantment> EnchantmentTags.SNOW_SPECIAL_TRADEstatic final TagKey<Enchantment> EnchantmentTags.SWAMP_COMMON_TRADEstatic final TagKey<Enchantment> EnchantmentTags.SWAMP_SPECIAL_TRADEstatic final TagKey<Enchantment> EnchantmentTags.TAIGA_COMMON_TRADEstatic final TagKey<Enchantment> EnchantmentTags.TAIGA_SPECIAL_TRADEstatic final TagKey<Enchantment> EnchantmentTags.TOOLTIP_ORDERstatic final TagKey<Enchantment> EnchantmentTags.TRADEABLEstatic final TagKey<Enchantment> EnchantmentTags.TREASUREMethods 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 TagKey<Enchantment> TradeOffers.EnchantBookFactory.possibleEnchantmentsConstructor parameters in net.minecraft.village with type arguments of type EnchantmentModifierConstructorDescriptionEnchantBookFactory(int experience, int minLevel, int maxLevel, TagKey<Enchantment> tagKey) EnchantBookFactory(int experience, TagKey<Enchantment> tagKey)