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 EnchantmentModifier and TypeMethodDescriptionstatic Enchantment
EnchantmentArgumentType.getEnchantment
(com.mojang.brigadier.context.CommandContext<ServerCommandSource> context, String name) EnchantmentArgumentType.parse
(com.mojang.brigadier.StringReader stringReader) -
Uses of Enchantment in net.minecraft.enchantment
Subclasses of Enchantment in net.minecraft.enchantmentModifier and TypeClassDescriptionclass
class
class
class
class
class
class
class
class
class
class
class
class
class
class
class
class
class
class
class
class
class
class
class
class
class
class
class
class
class
class
Fields in net.minecraft.enchantment declared as EnchantmentModifier 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.CHANNELING
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
static final Enchantment
Enchantments.SWIFT_SNEAK
static final Enchantment
Enchantments.THORNS
static final Enchantment
Enchantments.UNBREAKING
static final Enchantment
Enchantments.VANISHING_CURSE
Methods in net.minecraft.enchantment that return EnchantmentModifier and TypeMethodDescriptionstatic @Nullable Enchantment
Enchantment.byRawId
(int id) private static Enchantment
Enchantments.register
(String name, Enchantment enchantment) Methods in net.minecraft.enchantment that return types with arguments of type EnchantmentModifier and TypeMethodDescriptionstatic Map<Enchantment,
Integer> Loads enchantments from an NBT list.static Map<Enchantment,
Integer> Gets the enchantments on an item stack.Methods in net.minecraft.enchantment with parameters of type EnchantmentModifier 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 @Nullable Identifier
EnchantmentHelper.getEnchantmentId
(Enchantment enchantment) 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<Enchantment> existing, Enchantment candidate) Returns whether thecandidate
enchantment is compatible with theexisting
enchantments.private static Enchantment
Enchantments.register
(String name, Enchantment enchantment) Method parameters in net.minecraft.enchantment with type arguments of type EnchantmentModifier and TypeMethodDescriptionstatic boolean
EnchantmentHelper.isCompatible
(Collection<Enchantment> existing, Enchantment candidate) Returns whether thecandidate
enchantment is compatible with theexisting
enchantments.static void
EnchantmentHelper.set
(Map<Enchantment, Integer> enchantments, ItemStack stack) Sets the enchantments on an item stack.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 TypeMethodDescriptionvoid
ItemStack.addEnchantment
(Enchantment enchantment, int level) Enchants this item with the given enchantment and level. -
Uses of Enchantment in net.minecraft.loot.condition
Fields in net.minecraft.loot.condition declared as EnchantmentModifier and TypeFieldDescription(package private) final Enchantment
TableBonusLootCondition.enchantment
Methods in net.minecraft.loot.condition with parameters of type EnchantmentModifier and TypeMethodDescriptionstatic LootCondition.Builder
TableBonusLootCondition.builder
(Enchantment enchantment, float[] chances) Constructors in net.minecraft.loot.condition with parameters of type EnchantmentModifierConstructorDescription(package private)
TableBonusLootCondition
(Enchantment enchantment, float[] chances) -
Uses of Enchantment in net.minecraft.loot.function
Fields in net.minecraft.loot.function declared as EnchantmentModifier and TypeFieldDescription(package private) final Enchantment
ApplyBonusLootFunction.enchantment
Fields in net.minecraft.loot.function with type parameters of type EnchantmentModifier and TypeFieldDescriptionprivate final Set<Enchantment>
EnchantRandomlyLootFunction.Builder.enchantments
(package private) final List<Enchantment>
EnchantRandomlyLootFunction.enchantments
private final Map<Enchantment,
LootNumberProvider> SetEnchantmentsLootFunction.Builder.enchantments
(package private) final Map<Enchantment,
LootNumberProvider> SetEnchantmentsLootFunction.enchantments
Methods in net.minecraft.loot.function with parameters of type EnchantmentModifier and TypeMethodDescriptionEnchantRandomlyLootFunction.Builder.add
(Enchantment enchantment) private static void
SetEnchantmentsLootFunction.addEnchantmentToMap
(Map<Enchantment, Integer> map, Enchantment enchantment, int level) 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) Method parameters in net.minecraft.loot.function with type arguments of type EnchantmentModifier and TypeMethodDescriptionprivate static void
SetEnchantmentsLootFunction.addEnchantmentToMap
(Map<Enchantment, Integer> map, Enchantment enchantment, int level) Constructors in net.minecraft.loot.function with parameters of type EnchantmentModifierConstructorDescription(package private)
ApplyBonusLootFunction
(LootCondition[] conditions, Enchantment enchantment, ApplyBonusLootFunction.Formula formula) Constructor parameters in net.minecraft.loot.function with type arguments of type EnchantmentModifierConstructorDescription(package private)
EnchantRandomlyLootFunction
(LootCondition[] conditions, Collection<Enchantment> enchantments) (package private)
SetEnchantmentsLootFunction
(LootCondition[] conditions, Map<Enchantment, LootNumberProvider> enchantments, boolean add) -
Uses of Enchantment in net.minecraft.predicate.item
Fields in net.minecraft.predicate.item declared as EnchantmentModifier and TypeFieldDescriptionprivate final @Nullable Enchantment
EnchantmentPredicate.enchantment
Method parameters in net.minecraft.predicate.item with type arguments of type EnchantmentModifier and TypeMethodDescriptionboolean
EnchantmentPredicate.test
(Map<Enchantment, Integer> enchantments) Constructors in net.minecraft.predicate.item with parameters of type EnchantmentModifierConstructorDescriptionEnchantmentPredicate
(@Nullable Enchantment enchantment, NumberRange.IntRange levels) -
Uses of Enchantment in net.minecraft.server.command
Methods in net.minecraft.server.command with parameters of type EnchantmentModifier and TypeMethodDescriptionprivate static int
EnchantCommand.execute
(ServerCommandSource source, Collection<? extends Entity> targets, Enchantment enchantment, int level) -
Uses of Enchantment in net.minecraft.util.registry
Fields in net.minecraft.util.registry with type parameters of type EnchantmentModifier and TypeFieldDescriptionstatic final Registry<Enchantment>
Registry.ENCHANTMENT
static final RegistryKey<Registry<Enchantment>>
Registry.ENCHANTMENT_KEY