Add operators to deal with enchantments.
DasBrain opened this issue · 2 comments
Issue type:
Only keep the issue types that are applicable.
- ➕ Feature request
Currently, we only have an enchantable and an enchanted operator.
I'd like to propose a new Type (Enchantment) with some operators:
- Enchantment :: String -> Integer -> Enchantment
the constructor - enchantments :: Item -> [Enchantment]
returns a list of all Enchantments - enchantment.name() :: Enchantment -> String
returns the name of the enchantment - enchantment.level() :: Enchantment -> Integer
returns the level of the enchantment. - enchantment.maxLevel() :: Enchantment -> Integer
returns the maximum level of this enchantment type. - enchantment.isTreasure() :: Enchantment -> Boolean
returns if the enchantment is a "treasure" enchantment like Mending, Frost Walker, Curse of Vanishing. - enchantment.isCurse() :: Enchantment -> Boolean
returns if the enchantment is a curse. - enchantment.isCompatible() :: Enchantment -> Enchantment -> Boolean
returns if an enchantment is compatible with the other (e.g. false for Silk Touch and Fortune)
Maybe add also some helper operators:
- enchantment.isMaxLevel() :: Enchantment -> Boolean
returns true if the enchantment is at it's max level (or higher). - enchantment.getMinModifiedEnchantmentLevel() :: Enchantment -> Integer
returns the minimum modified enchantment level. - enchantment.getMaxModifiedEnchantmentLevel() :: Enchantment -> Integer
returns the maximum modified enchantment level.
Thank you for considering my suggestion.
Maybe even add a new Aspect to the Extra Dimensional Rader: Available Enchantments?