progress on using namespaced key instead of material

This commit is contained in:
alexcrea 2026-02-03 17:22:32 +01:00
parent 1a71086327
commit 7612eac765
Signed by: alexcrea
GPG key ID: E346CD16413450E3
32 changed files with 297 additions and 124 deletions

View file

@ -4,6 +4,7 @@ import org.bukkit.Material.ENCHANTED_BOOK
import org.bukkit.inventory.ItemStack
import org.bukkit.inventory.meta.Damageable
import xyz.alexcrea.cuanvil.enchant.CAEnchantment
import xyz.alexcrea.cuanvil.util.MaterialUtil.customType
import kotlin.math.ceil
import kotlin.math.max
import kotlin.math.min
@ -90,5 +91,5 @@ object ItemUtil {
*/
fun ItemStack.canMergeWith(
other: ItemStack?
) = (other != null) && (type == other.type || (other.isEnchantedBook()))
) = (other != null) && (customType == other.customType || (other.isEnchantedBook()))
}