mirror of
https://github.com/alexcrea/CustomAnvil.git
synced 2026-06-24 00:26:16 +02:00
Add Bulk enchantment operation interface.
This commit is contained in:
parent
0fd12b4185
commit
d3252eecbd
6 changed files with 136 additions and 2 deletions
|
|
@ -29,7 +29,6 @@ object ItemUtil {
|
|||
fun ItemStack.setEnchantmentsUnsafe(enchantments: Map<CAEnchantment, Int>) {
|
||||
CAEnchantment.clearEnchants(this)
|
||||
|
||||
//TODO maybe faster methode to add vanilla enchantment. maybe move this function to wrapped enchantment
|
||||
enchantments.forEach { (enchantment, level) ->
|
||||
enchantment.addEnchantmentUnsafe(this, level)
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue