@CatalogedBy(value=EnchantmentTypes.class) public interface EnchantmentType extends CatalogType, Translatable
Modifier and Type | Method and Description |
---|---|
boolean |
canBeAppliedByTable(ItemStack stack)
Test if this enchantment type can be applied to an
ItemStack by
the EnchantmentTable . |
boolean |
canBeAppliedToStack(ItemStack stack)
Test if this enchantment type can be applied to an
ItemStack . |
int |
getMaximumEnchantabilityForLevel(int level)
Gets the maximum item enchantability for this level to be normally added
by enchanting tables.
|
int |
getMaximumLevel()
Gets the maximum level of this enchantment type normally allowed.
|
int |
getMinimumEnchantabilityForLevel(int level)
Gets the minimum item enchantability for this level to be normally added
by enchanting tables.
|
int |
getMinimumLevel()
Gets the minimum level of this enchantment type allowed where
it is present.
|
int |
getWeight()
Gets the weight of this enchantment type.
|
boolean |
isCompatibleWith(EnchantmentType enchantmentType)
Test if this enchantment type can be applied along with
another enchantment type.
|
boolean |
isCurse()
Gets whether or not this enchantment type is considered a "curse"
enchantment.
|
boolean |
isTreasure()
Gets whether or not this enchantment type is considered a "treasure"
enchantment.
|
getId, getName
getTranslation
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
- The enchantment type levelint getMaximumEnchantabilityForLevel(int level)
level
- The enchantment type levelboolean canBeAppliedToStack(ItemStack stack)
ItemStack
.stack
- The item stack to checkboolean canBeAppliedByTable(ItemStack stack)
ItemStack
by
the EnchantmentTable
.stack
- Te item stack to checkboolean isCompatibleWith(EnchantmentType enchantmentType)
enchantmentType
- The enchantment type to test compatibility withboolean isTreasure()
These do not occur naturally in enchantment tables.
boolean isCurse()