public interface Enchantment extends CatalogType, Translatable
Modifier and Type | Method and Description |
---|---|
boolean |
canBeAppliedByTable(ItemStack stack)
Test if this enchantment can be applied to an ItemStack by the Enchanting Table.
|
boolean |
canBeAppliedToStack(ItemStack stack)
Test if this enchantment can be applied to an ItemStack.
|
int |
getMaximumEnchantabilityForLevel(int level)
Get the maximum item enchantibility for this level to be normally added
by enchanting tables.
|
int |
getMaximumLevel()
Get the maximum level of this enchantment normally allowed.
|
int |
getMinimumEnchantabilityForLevel(int level)
Get the minimum item enchantibility for this level to be normally added
by enchanting tables.
|
int |
getMinimumLevel()
Get the minimum level of this enchantment allowed where it is present.
|
String |
getName()
Gets the id of this enchantment.
|
int |
getWeight()
Get the weight of the enchantment.
|
boolean |
isCompatibleWith(Enchantment ench)
Test if this enchantment can be applied along with another enchantment.
|
getId
getTranslation
String getName()
Ex. Minecraft registers Efficiency as "minecraft:efficiency".
getName
in interface CatalogType
int getWeight()
Higher values are more common. This value is also used in the repair cost calculation.
int getMinimumLevel()
int getMaximumLevel()
int getMinimumEnchantabilityForLevel(int level)
level
- Enchantment levelint getMaximumEnchantabilityForLevel(int level)
level
- Enchantment levelboolean canBeAppliedToStack(ItemStack stack)
stack
- ItemStack to checkboolean canBeAppliedByTable(ItemStack stack)
stack
- ItemStack to checkboolean isCompatibleWith(Enchantment ench)
ench
- Enchantment to test compatibility with