summaryrefslogtreecommitdiff
path: root/src/main/java/at/hannibal2/skyhanni/utils
diff options
context:
space:
mode:
authorhannibal2 <24389977+hannibal002@users.noreply.github.com>2024-06-12 16:48:50 +0200
committerGitHub <noreply@github.com>2024-06-12 16:48:50 +0200
commitaad0618be1a84abec30b35d8ae2ec1db084ff236 (patch)
tree6dc4c6f965b145b14490c2b7de3b6498e6560e06 /src/main/java/at/hannibal2/skyhanni/utils
parentc3ba0fe0121b8eff1056fadfde5b8992d4aafe21 (diff)
downloadskyhanni-aad0618be1a84abec30b35d8ae2ec1db084ff236.tar.gz
skyhanni-aad0618be1a84abec30b35d8ae2ec1db084ff236.tar.bz2
skyhanni-aad0618be1a84abec30b35d8ae2ec1db084ff236.zip
Backend: Fixed wardrobe not using tooltip event (#2062)
Co-authored-by: hannibal2 <24389977+hannibal00212@users.noreply.github.com>
Diffstat (limited to 'src/main/java/at/hannibal2/skyhanni/utils')
-rw-r--r--src/main/java/at/hannibal2/skyhanni/utils/InventoryUtils.kt6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/main/java/at/hannibal2/skyhanni/utils/InventoryUtils.kt b/src/main/java/at/hannibal2/skyhanni/utils/InventoryUtils.kt
index 53ee6cf7a..ab0afd93c 100644
--- a/src/main/java/at/hannibal2/skyhanni/utils/InventoryUtils.kt
+++ b/src/main/java/at/hannibal2/skyhanni/utils/InventoryUtils.kt
@@ -111,9 +111,9 @@ object InventoryUtils {
}
}
- fun getItemAtSlotIndex(slotIndex: Int): ItemStack? {
- return getItemsInOpenChest().find { it.slotIndex == slotIndex }?.stack
- }
+ fun getItemAtSlotIndex(slotIndex: Int): ItemStack? = getSlotAtIndex(slotIndex)?.stack
+
+ fun getSlotAtIndex(slotIndex: Int): Slot? = getItemsInOpenChest().find { it.slotIndex == slotIndex }
fun NEUInternalName.getAmountInInventory(): Int = countItemsInLowerInventory { it.getInternalNameOrNull() == this }