From cdfec7e6849c3a807812515eef26582933fbadd8 Mon Sep 17 00:00:00 2001 From: hannibal2 <24389977+hannibal00212@users.noreply.github.com> Date: Sat, 7 Jan 2023 04:58:27 +0100 Subject: Fixed error in Sea Creature Guide inventory. --- src/main/java/at/hannibal2/skyhanni/utils/InventoryUtils.kt | 11 +++++++++++ 1 file changed, 11 insertions(+) (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 1d51d1be9..f1f107e2f 100644 --- a/src/main/java/at/hannibal2/skyhanni/utils/InventoryUtils.kt +++ b/src/main/java/at/hannibal2/skyhanni/utils/InventoryUtils.kt @@ -32,4 +32,15 @@ object InventoryUtils { } return list } + + fun openInventoryName(): String { + val guiChest = Minecraft.getMinecraft().currentScreen + val chestName = if (guiChest is GuiChest) { + val chest = guiChest.inventorySlots as ContainerChest + chest.lowerChestInventory.displayName.unformattedText.trim() + } else { + "" + } + return chestName + } } \ No newline at end of file -- cgit