JavaScript is disabled on your browser.
Description
Nested Class Summary
Field Summary
Method Summary
Field Details
MAX_LEVEL
MAX_WEIGHT
Method Details
typedKey()
description()
supportedItems()
primaryItems()
exclusiveSet()
maxLevel()
weight()
anvilCost()
minCost()
maxCost()
slots()
matchesSlot(EquipmentSlot)
effectComponents()
hasEffect(Key)
effectsJson()
behaviour()
toJson()
toBuilder()
All Superinterfaces:
Keyed
Nested Class Summary
Nested Classes
static interface
static interface
An enchanting cost depending on the level, equal to
base + perLevelAboveFirst * (level - 1).
Field Summary
Fields
static final int
The highest level of an enchantment.
static final int
The highest weight of an enchantment.
Method Summary
All Methods Instance Methods Abstract Methods Default Methods
int
Returns the base anvil cost per level.
Returns the behaviour of this definition, if any.
Returns the name of the enchantment, without its level.
Returns the effect components declared by the enchantment, such as minecraft:damage.
Returns the effects object of the enchantment as JSON, or empty if it declares no effect
component.
Returns the enchantments incompatible with this one, possibly empty.
default boolean
Returns true if the enchantment declares the effect component component.
default boolean
Returns true if the enchantment is active in slot.
Returns the maximum enchanting cost of each level.
int
Returns the maximum level, between
1 and
255 .
Returns the minimum enchanting cost of each level.
Returns the items the enchanting table offers the enchantment for, or empty to use
supportedItems().
Returns the equipment slots in which the enchantment is active.
Returns the items the enchantment can be applied to.
Returns a new builder pre-filled with the values of this definition.
Returns this definition in its data pack JSON representation.
Returns this enchantment's key, typed against the minecraft:enchantment registry.
int
Returns the weight of the enchantment in random selections, between
1 and
1024 .
Methods inherited from interface Keyed
key