From 0e1ddd2c913656a631e26dd0c560f25179a7dc2d Mon Sep 17 00:00:00 2001 From: Linnea Gräf Date: Fri, 8 Nov 2024 22:02:10 +0100 Subject: Fix missing tags in REI rendering --- src/main/kotlin/repo/SBItemStack.kt | 3 +++ 1 file changed, 3 insertions(+) (limited to 'src/main/kotlin/repo/SBItemStack.kt') diff --git a/src/main/kotlin/repo/SBItemStack.kt b/src/main/kotlin/repo/SBItemStack.kt index e1cbdbb..18126ee 100644 --- a/src/main/kotlin/repo/SBItemStack.kt +++ b/src/main/kotlin/repo/SBItemStack.kt @@ -58,6 +58,7 @@ data class SBItemStack constructor( SBItemStack(id, count) } } + val EMPTY = SBItemStack(SkyblockId.NULL, 0) operator fun invoke(itemStack: ItemStack): SBItemStack { val skyblockId = itemStack.skyBlockId ?: SkyblockId.NULL @@ -133,6 +134,8 @@ data class SBItemStack constructor( val itemStack = itemStack_ ?: run { if (skyblockId == SkyblockId.COINS) return@run ItemCache.coinItem(stackSize).also { it.appendLore(extraLore) } + if (stackSize == 0) + return@run ItemStack.EMPTY val replacementData = mutableMapOf() injectReplacementDataForPets(replacementData) return@run neuItem.asItemStack(idHint = skyblockId, replacementData) -- cgit