summaryrefslogtreecommitdiff
path: root/src/main/java/at/hannibal2/skyhanni/utils
diff options
context:
space:
mode:
authorHiZe_ <superhize@hotmail.com>2023-07-24 13:26:18 +0200
committerGitHub <noreply@github.com>2023-07-24 13:26:18 +0200
commit2c61e4e7ee05a5ebb7d3012d1aae6a6e3aa4d04e (patch)
tree24a99702b825ef7f6de5bba6ad0478684366717e /src/main/java/at/hannibal2/skyhanni/utils
parent450a0a003d687ae16448734ebef25acfb17cdde4 (diff)
downloadskyhanni-2c61e4e7ee05a5ebb7d3012d1aae6a6e3aa4d04e.tar.gz
skyhanni-2c61e4e7ee05a5ebb7d3012d1aae6a6e3aa4d04e.tar.bz2
skyhanni-2c61e4e7ee05a5ebb7d3012d1aae6a6e3aa4d04e.zip
add npc motes sell value for current opened chest (#317)
Co-authored-by: superhize <superhize@gmail.com> 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.kt12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/main/java/at/hannibal2/skyhanni/utils/InventoryUtils.kt b/src/main/java/at/hannibal2/skyhanni/utils/InventoryUtils.kt
index 9edd186d2..9e1ade646 100644
--- a/src/main/java/at/hannibal2/skyhanni/utils/InventoryUtils.kt
+++ b/src/main/java/at/hannibal2/skyhanni/utils/InventoryUtils.kt
@@ -23,11 +23,11 @@ object InventoryUtils {
}
fun openInventoryName() = Minecraft.getMinecraft().currentScreen.let {
- if (it is GuiChest) {
- val chest = it.inventorySlots as ContainerChest
- chest.getInventoryName()
- } else ""
- }
+ if (it is GuiChest) {
+ val chest = it.inventorySlots as ContainerChest
+ chest.getInventoryName()
+ } else ""
+ }
fun ContainerChest.getInventoryName() = this.lowerChestInventory.displayName.unformattedText.trim()
@@ -39,7 +39,7 @@ object InventoryUtils {
fun getArmor(): Array<ItemStack?> = Minecraft.getMinecraft().thePlayer.inventory.armorInventory
fun inStorage() =
- openInventoryName().let { it.contains("Storage") || it.contains("Ender Chest") || it.contains("Backpack") }
+ openInventoryName().let { (it.contains("Storage") && it != "Rift Storage") || it.contains("Ender Chest") || it.contains("Backpack")}
fun getItemInHand(): ItemStack? = Minecraft.getMinecraft().thePlayer.heldItem
} \ No newline at end of file