diff options
| author | HiZe_ <superhize@hotmail.com> | 2023-07-24 13:26:18 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2023-07-24 13:26:18 +0200 |
| commit | 2c61e4e7ee05a5ebb7d3012d1aae6a6e3aa4d04e (patch) | |
| tree | 24a99702b825ef7f6de5bba6ad0478684366717e /src/main/java/at/hannibal2/skyhanni/utils | |
| parent | 450a0a003d687ae16448734ebef25acfb17cdde4 (diff) | |
| download | skyhanni-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.kt | 12 |
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 |
