Required Enchantment
data class RequiredEnchantment(val enchantmentKey: NamespacedKey, val seekers: List<RegistrableEnchantmentSeeker>, val levels: List<Int>) : Keyed, Describable<RequiredEnchantment>
This object represents an enchantment being required as a part of another enchantment. For example, an enchantment might require the player to have Fire Aspect of any level on the same item, or Sharpness from II to V on the offhand item.
Constructors
Link copied to clipboard
constructor(enchantmentKey: NamespacedKey, seekers: List<RegistrableEnchantmentSeeker>, levels: List<Int>)
Properties
Link copied to clipboard
Link copied to clipboard
Returns all seekers for this enchantment. Out of all of them, at least one of them must find the enchantment. If the list is empty, the enchantment is assumed to be sought on the same item that has activated the enchantment - however, since there is no clear way to determine exactly what item activated the enchantment (the initial seeker might find multiple matching items during the activation detection process), this is discouraged.