Uses of Class
net.minecraft.enchantment.Enchantment
-
Uses of Enchantment in net.minecraft.command.argument
Methods in net.minecraft.command.argument that return Enchantment Modifier and Type Method Description static Enchantment
EnchantmentArgumentType. getEnchantment(com.mojang.brigadier.context.CommandContext<ServerCommandSource> context, String name)
Enchantment
EnchantmentArgumentType. parse(com.mojang.brigadier.StringReader stringReader)
-
Uses of Enchantment in net.minecraft.enchantment
Subclasses of Enchantment in net.minecraft.enchantment Modifier and Type Class Description class
AquaAffinityEnchantment
class
BindingCurseEnchantment
class
ChannelingEnchantment
class
DamageEnchantment
class
DepthStriderEnchantment
class
EfficiencyEnchantment
class
FireAspectEnchantment
class
FlameEnchantment
class
FrostWalkerEnchantment
class
ImpalingEnchantment
class
InfinityEnchantment
class
KnockbackEnchantment
class
LoyaltyEnchantment
class
LuckEnchantment
class
LureEnchantment
class
MendingEnchantment
class
MultishotEnchantment
class
PiercingEnchantment
class
PowerEnchantment
class
ProtectionEnchantment
class
PunchEnchantment
class
QuickChargeEnchantment
class
RespirationEnchantment
class
RiptideEnchantment
class
SilkTouchEnchantment
class
SoulSpeedEnchantment
class
SweepingEnchantment
class
ThornsEnchantment
class
UnbreakingEnchantment
class
VanishingCurseEnchantment
Fields in net.minecraft.enchantment declared as Enchantment Modifier and Type Field Description static Enchantment
Enchantments. AQUA_AFFINITY
static Enchantment
Enchantments. BANE_OF_ARTHROPODS
static Enchantment
Enchantments. BINDING_CURSE
static Enchantment
Enchantments. BLAST_PROTECTION
static Enchantment
Enchantments. CHANNELING
static Enchantment
Enchantments. DEPTH_STRIDER
static Enchantment
Enchantments. EFFICIENCY
Enchantment
EnchantmentLevelEntry. enchantment
static Enchantment
Enchantments. FEATHER_FALLING
static Enchantment
Enchantments. FIRE_ASPECT
static Enchantment
Enchantments. FIRE_PROTECTION
static Enchantment
Enchantments. FLAME
static Enchantment
Enchantments. FORTUNE
static Enchantment
Enchantments. FROST_WALKER
static Enchantment
Enchantments. IMPALING
static Enchantment
Enchantments. INFINITY
static Enchantment
Enchantments. KNOCKBACK
static Enchantment
Enchantments. LOOTING
static Enchantment
Enchantments. LOYALTY
static Enchantment
Enchantments. LUCK_OF_THE_SEA
static Enchantment
Enchantments. LURE
static Enchantment
Enchantments. MENDING
static Enchantment
Enchantments. MULTISHOT
static Enchantment
Enchantments. PIERCING
static Enchantment
Enchantments. POWER
static Enchantment
Enchantments. PROJECTILE_PROTECTION
static Enchantment
Enchantments. PROTECTION
static Enchantment
Enchantments. PUNCH
static Enchantment
Enchantments. QUICK_CHARGE
static Enchantment
Enchantments. RESPIRATION
static Enchantment
Enchantments. RIPTIDE
static Enchantment
Enchantments. SHARPNESS
static Enchantment
Enchantments. SILK_TOUCH
static Enchantment
Enchantments. SMITE
static Enchantment
Enchantments. SOUL_SPEED
static Enchantment
Enchantments. SWEEPING
static Enchantment
Enchantments. THORNS
static Enchantment
Enchantments. UNBREAKING
static Enchantment
Enchantments. VANISHING_CURSE
Methods in net.minecraft.enchantment that return Enchantment Modifier and Type Method Description static @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 Enchantment Modifier and Type Method Description static Map<Enchantment,Integer>
EnchantmentHelper. fromNbt(NbtList list)
Loads enchantments from an NBT list.static Map<Enchantment,Integer>
EnchantmentHelper. get(ItemStack stack)
Gets the enchantments on an item stack.Methods in net.minecraft.enchantment with parameters of type Enchantment Modifier and Type Method Description void
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.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, indicating the item stack has the enchantment supplied.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, indicating the item stack has the enchantment supplied and fulfills the extra condition.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 Enchantment Modifier and Type Method Description static 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 Constructor Description EnchantmentLevelEntry(Enchantment enchantment, int level)
-
Uses of Enchantment in net.minecraft.item
Methods in net.minecraft.item with parameters of type Enchantment Modifier and Type Method Description void
ItemStack. addEnchantment(Enchantment enchantment, int level)
-
Uses of Enchantment in net.minecraft.loot.condition
Fields in net.minecraft.loot.condition declared as Enchantment Modifier and Type Field Description private Enchantment
TableBonusLootCondition. enchantment
Methods in net.minecraft.loot.condition with parameters of type Enchantment Modifier and Type Method Description static LootCondition.Builder
TableBonusLootCondition. builder(Enchantment enchantment, float[] chances)
Constructors in net.minecraft.loot.condition with parameters of type Enchantment Constructor Description TableBonusLootCondition(Enchantment enchantment, float[] chances)
-
Uses of Enchantment in net.minecraft.loot.function
Fields in net.minecraft.loot.function declared as Enchantment Modifier and Type Field Description private Enchantment
ApplyBonusLootFunction. enchantment
Fields in net.minecraft.loot.function with type parameters of type Enchantment Modifier and Type Field Description private Set<Enchantment>
EnchantRandomlyLootFunction.Builder. enchantments
private List<Enchantment>
EnchantRandomlyLootFunction. enchantments
private Map<Enchantment,LootNumberProvider>
SetEnchantmentsLootFunction. enchantments
private Map<Enchantment,LootNumberProvider>
SetEnchantmentsLootFunction.class_6158. field_31864
Methods in net.minecraft.loot.function with parameters of type Enchantment Modifier and Type Method Description EnchantRandomlyLootFunction.Builder
EnchantRandomlyLootFunction.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.class_6158
SetEnchantmentsLootFunction.class_6158. method_35539(Enchantment enchantment, LootNumberProvider lootNumberProvider)
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 Enchantment Modifier and Type Method Description private static void
SetEnchantmentsLootFunction. addEnchantmentToMap(Map<Enchantment,Integer> map, Enchantment enchantment, int level)
Constructors in net.minecraft.loot.function with parameters of type Enchantment Constructor Description ApplyBonusLootFunction(LootCondition[] conditions, Enchantment enchantment, ApplyBonusLootFunction.Formula formula)
Constructor parameters in net.minecraft.loot.function with type arguments of type Enchantment Constructor Description EnchantRandomlyLootFunction(LootCondition[] conditions, Collection<Enchantment> enchantments)
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 Enchantment Modifier and Type Field Description private Enchantment
EnchantmentPredicate. enchantment
Method parameters in net.minecraft.predicate.item with type arguments of type Enchantment Modifier and Type Method Description boolean
EnchantmentPredicate. test(Map<Enchantment,Integer> enchantments)
Constructors in net.minecraft.predicate.item with parameters of type Enchantment Constructor Description EnchantmentPredicate(@Nullable Enchantment enchantment, NumberRange.IntRange levels)
-
Uses of Enchantment in net.minecraft.server.command
Methods in net.minecraft.server.command with parameters of type Enchantment Modifier and Type Method Description private 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 Enchantment Modifier and Type Field Description static Registry<Enchantment>
Registry. ENCHANTMENT
static RegistryKey<Registry<Enchantment>>
Registry. ENCHANTMENT_KEY