Uses of Record 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.getEnchantmentEntries()ItemEnchantmentsComponent.Builder.getEnchantments()ItemEnchantmentsComponent.getEnchantments()Method parameters in net.minecraft.component.type with type arguments of type EnchantmentModifier and TypeMethodDescriptionvoidItemEnchantmentsComponent.Builder.add(RegistryEntry<Enchantment> enchantment, int level) intItemEnchantmentsComponent.Builder.getLevel(RegistryEntry<Enchantment> enchantment) intItemEnchantmentsComponent.getLevel(RegistryEntry<Enchantment> enchantment) voidItemEnchantmentsComponent.Builder.remove(Predicate<RegistryEntry<Enchantment>> predicate) voidItemEnchantmentsComponent.Builder.set(RegistryEntry<Enchantment> enchantment, 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.createEquipmentTableBuilder(Item helmet, Item chestplate, ArmorTrim trim, RegistryWrapper.Impl<Enchantment> enchantmentRegistryWrapper) -
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 com.mojang.serialization.Codec<Enchantment> Enchantment.CODECstatic final RegistryKey<Enchantment> Enchantments.DENSITYstatic final RegistryKey<Enchantment> Enchantments.DEPTH_STRIDERstatic final RegistryKey<Enchantment> Enchantments.EFFICIENCYfinal RegistryEntry<Enchantment> EnchantmentLevelEntry.enchantmentstatic final com.mojang.serialization.Codec<RegistryEntry<Enchantment>> Enchantment.ENTRY_CODECstatic final PacketCodec<RegistryByteBuf, RegistryEntry<Enchantment>> Enchantment.ENTRY_PACKET_CODECprivate RegistryEntryList<Enchantment> Enchantment.Builder.exclusiveSetprivate final RegistryEntryList<Enchantment> Enchantment.exclusiveSetThe field for theexclusiveSetrecord component.static final RegistryKey<Enchantment> Enchantments.FEATHER_FALLINGstatic 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> Method parameters in net.minecraft.enchantment with type arguments of type EnchantmentModifier and TypeMethodDescriptionvoidEnchantmentHelper.Consumer.accept(RegistryEntry<Enchantment> enchantment, int level) voidEnchantmentHelper.ContextAwareConsumer.accept(RegistryEntry<Enchantment> enchantment, int level, EnchantmentEffectContext context) static voidEnchantments.bootstrap(Registerable<Enchantment> registry) static booleanEnchantment.canBeCombined(RegistryEntry<Enchantment> first, RegistryEntry<Enchantment> second) static ItemStackEnchantmentHelper.enchant(Random random, ItemStack stack, int level, Stream<RegistryEntry<Enchantment>> possibleEnchantments) Enchants thetargetitem stack and returns it.static ItemStackEnchantmentHelper.enchant(Random random, ItemStack stack, int level, DynamicRegistryManager dynamicRegistryManager, Optional<? extends RegistryEntryList<Enchantment>> enchantments) Enchantment.Builder.exclusiveSet(RegistryEntryList<Enchantment> exclusiveSet) static List<EnchantmentLevelEntry> EnchantmentHelper.generateEnchantments(Random random, ItemStack stack, int level, Stream<RegistryEntry<Enchantment>> possibleEnchantments) Generate the enchantments for enchanting thestack.static intEnchantmentHelper.getEquipmentLevel(RegistryEntry<Enchantment> enchantment, LivingEntity entity) Returns the highest level of the passed enchantment in the enchantment's applicable equipment slots' item stacks.static intEnchantmentHelper.getLevel(RegistryEntry<Enchantment> enchantment, ItemStack stack) Gets the level of an enchantment on an item stack.static TextEnchantment.getName(RegistryEntry<Enchantment> enchantment, int level) static List<EnchantmentLevelEntry> EnchantmentHelper.getPossibleEntries(int level, ItemStack stack, Stream<RegistryEntry<Enchantment>> possibleEnchantments) Gets all the possible entries for enchanting thestackat the givenpower.static booleanEnchantmentHelper.hasAnyEnchantmentsIn(ItemStack stack, TagKey<Enchantment> tag) static booleanEnchantmentHelper.isCompatible(Collection<RegistryEntry<Enchantment>> existing, RegistryEntry<Enchantment> candidate) Returns whether thecandidateenchantment is compatible with theexistingenchantments.static booleanEnchantmentHelper.isCompatible(Collection<RegistryEntry<Enchantment>> existing, RegistryEntry<Enchantment> candidate) Returns whether thecandidateenchantment is compatible with theexistingenchantments.private static voidEnchantments.register(Registerable<Enchantment> registry, RegistryKey<Enchantment> key, Enchantment.Builder builder) private static voidEnchantments.register(Registerable<Enchantment> registry, RegistryKey<Enchantment> key, Enchantment.Builder builder) Constructor parameters in net.minecraft.enchantment with type arguments of type EnchantmentModifierConstructorDescriptionEnchantment(Text text, Enchantment.Definition definition, RegistryEntryList<Enchantment> registryEntryList, ComponentMap componentMap) EnchantmentLevelEntry(RegistryEntry<Enchantment> enchantment, int level) -
Uses of Enchantment in net.minecraft.enchantment.provider
Fields in net.minecraft.enchantment.provider with type parameters of type EnchantmentModifier and TypeFieldDescriptionprivate final RegistryEntry<Enchantment> SingleEnchantmentProvider.enchantmentThe field for theenchantmentrecord component.private final RegistryEntryList<Enchantment> ByCostEnchantmentProvider.enchantmentsThe field for theenchantmentsrecord component.private final RegistryEntryList<Enchantment> ByCostWithDifficultyEnchantmentProvider.enchantmentsThe field for theenchantmentsrecord component.Methods in net.minecraft.enchantment.provider that return types with arguments of type EnchantmentModifier and TypeMethodDescriptionSingleEnchantmentProvider.enchantment()Returns the value of theenchantmentrecord component.ByCostEnchantmentProvider.enchantments()Returns the value of theenchantmentsrecord component.ByCostWithDifficultyEnchantmentProvider.enchantments()Returns the value of theenchantmentsrecord component.Constructor parameters in net.minecraft.enchantment.provider with type arguments of type EnchantmentModifierConstructorDescriptionByCostEnchantmentProvider(RegistryEntryList<Enchantment> registryEntryList, IntProvider intProvider) ByCostWithDifficultyEnchantmentProvider(RegistryEntryList<Enchantment> registryEntryList, int int2, int int3) SingleEnchantmentProvider(RegistryEntry<Enchantment> registryEntry, IntProvider intProvider) -
Uses of Enchantment in net.minecraft.entity
Fields in net.minecraft.entity with type parameters of type EnchantmentModifier and TypeFieldDescriptionprivate final Reference2ObjectMap<Enchantment, Set<EnchantmentLocationBasedEffect>> LivingEntity.locationBasedEnchantmentEffectsMethods 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, ItemGroup.StackVisibility stackVisibility) voidItemStack.addEnchantment(RegistryEntry<Enchantment> enchantment, int level) Enchants this item with the given enchantment and level.private static voidItemGroups.addMaxLevelEnchantedBooks(ItemGroup.Entries entries, RegistryWrapper<Enchantment> registryWrapper, ItemGroup.StackVisibility stackVisibility) -
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> RandomChanceWithEnchantedBonusLootCondition.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 TypeMethodDescriptionRandomChanceWithEnchantedBonusLootCondition.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> enchantment, float[] chances) Constructor parameters in net.minecraft.loot.condition with type arguments of type EnchantmentModifierConstructorDescriptionRandomChanceWithEnchantedBonusLootCondition(float float2, EnchantmentLevelBasedValue enchantmentLevelBasedValue, 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 RegistryEntry<Enchantment> EnchantedCountIncreaseLootFunction.Builder.enchantmentprivate final RegistryEntry<Enchantment> EnchantedCountIncreaseLootFunction.enchantmentprivate final ImmutableMap.Builder<RegistryEntry<Enchantment>, LootNumberProvider> SetEnchantmentsLootFunction.Builder.enchantmentsprivate final Map<RegistryEntry<Enchantment>, LootNumberProvider> SetEnchantmentsLootFunction.enchantmentsprivate Optional<RegistryEntryList<Enchantment>> EnchantRandomlyLootFunction.Builder.optionsprivate final Optional<RegistryEntryList<Enchantment>> EnchantRandomlyLootFunction.optionsprivate Optional<RegistryEntryList<Enchantment>> EnchantWithLevelsLootFunction.Builder.optionsprivate final Optional<RegistryEntryList<Enchantment>> EnchantWithLevelsLootFunction.optionsMethod parameters in net.minecraft.loot.function with type arguments of type EnchantmentModifier and TypeMethodDescriptionprivate static ItemStackEnchantRandomlyLootFunction.addEnchantmentToStack(ItemStack stack, RegistryEntry<Enchantment> enchantment, Random random) static ConditionalLootFunction.Builder<?> ApplyBonusLootFunction.binomialWithBonusCount(RegistryEntry<Enchantment> enchantment, float probability, int extra) SetEnchantmentsLootFunction.Builder.enchantment(RegistryEntry<Enchantment> enchantment, LootNumberProvider level) EnchantRandomlyLootFunction.Builder.option(RegistryEntry<Enchantment> enchantment) EnchantRandomlyLootFunction.Builder.options(RegistryEntryList<Enchantment> options) EnchantWithLevelsLootFunction.Builder.options(RegistryEntryList<Enchantment> options) static ConditionalLootFunction.Builder<?> ApplyBonusLootFunction.oreDrops(RegistryEntry<Enchantment> enchantment) static ConditionalLootFunction.Builder<?> ApplyBonusLootFunction.uniformBonusCount(RegistryEntry<Enchantment> enchantment) static ConditionalLootFunction.Builder<?> ApplyBonusLootFunction.uniformBonusCount(RegistryEntry<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) Builder(RegistryEntry<Enchantment> enchantment, LootNumberProvider count) (package private)EnchantedCountIncreaseLootFunction(List<LootCondition> conditions, RegistryEntry<Enchantment> enchantment, LootNumberProvider count, int limit) (package private)EnchantRandomlyLootFunction(List<LootCondition> conditions, Optional<RegistryEntryList<Enchantment>> options, boolean onlyCompatible) (package private)EnchantWithLevelsLootFunction(List<LootCondition> conditions, LootNumberProvider levels, Optional<RegistryEntryList<Enchantment>> options) (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.testLevel(ItemEnchantmentsComponent enchantmentsComponent, RegistryEntry<Enchantment> enchantment) Constructor parameters in net.minecraft.predicate.item with type arguments of type EnchantmentModifierConstructorDescriptionEnchantmentPredicate(Optional<RegistryEntryList<Enchantment>> optional, NumberRange.IntRange intRange) EnchantmentPredicate(RegistryEntry<Enchantment> enchantment, NumberRange.IntRange levels) EnchantmentPredicate(RegistryEntryList<Enchantment> enchantments, NumberRange.IntRange levels) -
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> possibleEnchantments) EnchantBookFactory(int experience, TagKey<Enchantment> possibleEnchantments)