diff --git a/src/main/java/at/hannibal2/skyhanni/features/inventory/ItemPickupLog.kt b/src/main/java/at/hannibal2/skyhanni/features/inventory/ItemPickupLog.kt index 12b3e9495d63..153cfff4e512 100644 --- a/src/main/java/at/hannibal2/skyhanni/features/inventory/ItemPickupLog.kt +++ b/src/main/java/at/hannibal2/skyhanni/features/inventory/ItemPickupLog.kt @@ -17,7 +17,7 @@ import at.hannibal2.skyhanni.utils.ItemUtils.getItemRarityOrNull import at.hannibal2.skyhanni.utils.ItemUtils.itemName import at.hannibal2.skyhanni.utils.LorenzUtils import at.hannibal2.skyhanni.utils.NEUInternalName -import at.hannibal2.skyhanni.utils.NEUInternalName.Companion.asInternalName +import at.hannibal2.skyhanni.utils.NEUInternalName.Companion.toInternalName import at.hannibal2.skyhanni.utils.NEUItems.getItemStack import at.hannibal2.skyhanni.utils.NEUItems.getItemStackOrNull import at.hannibal2.skyhanni.utils.NumberUtil.addSeparators @@ -78,7 +78,9 @@ object ItemPickupLog { } private val config get() = SkyHanniMod.feature.inventory.itemPickupLogConfig - private val coinIcon = "COIN_TALISMAN".asInternalName() + private val coinIcon = "COIN_TALISMAN".toInternalName() + private val HAY_BALE = "HAY_BALE".toInternalName() + private val HAY_BLOCK = "HAY_BLOCK".toInternalName() private var itemList = mutableMapOf>() private var itemsAddedToInventory = mutableMapOf() @@ -101,7 +103,7 @@ object ItemPickupLog { "ELLE_SUPPLIES", "ELLE_FUEL_CELL", ) - private val bannedItemsConverted = bannedItemsPattern.map { it.toString().asInternalName() } + private val bannedItemsConverted = bannedItemsPattern.map { it.toString().toInternalName() } @SubscribeEvent fun onRenderOverlay(event: GuiRenderEvent) { @@ -122,7 +124,11 @@ object ItemPickupLog { if (!isEnabled() || !config.sack) return event.sackChanges.forEach { - val itemStack = (it.internalName.getItemStack()) + + // TODO this should not need to be done here but the whole internal name resolving needs a rework and this fixes it for now + val internalName = if (it.internalName == HAY_BALE) HAY_BLOCK else it.internalName + val itemStack = internalName.getItemStack() + val item = PickupEntry(itemStack.dynamicName(), it.delta.absoluteValue.toLong(), it.internalName) updateItem(itemStack.hash(), item, itemStack, it.delta < 0)