From 2c61e4e7ee05a5ebb7d3012d1aae6a6e3aa4d04e Mon Sep 17 00:00:00 2001 From: HiZe_ Date: Mon, 24 Jul 2023 13:26:18 +0200 Subject: add npc motes sell value for current opened chest (#317) Co-authored-by: superhize Co-authored-by: hannibal2 <24389977+hannibal00212@users.noreply.github.com> --- src/main/java/at/hannibal2/skyhanni/utils/InventoryUtils.kt | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'src/main/java/at/hannibal2/skyhanni/utils') 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 = 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 -- cgit