From aa327dcfd0bb09b42ca28dbfd9361ca9340351d6 Mon Sep 17 00:00:00 2001 From: Linnea Gräf Date: Fri, 21 Mar 2025 23:46:34 +0100 Subject: fix: Not being able to mine after closing the storage overlay --- .../kotlin/features/inventory/storageoverlay/StorageOverlayScreen.kt | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'src/main/kotlin/features/inventory/storageoverlay') diff --git a/src/main/kotlin/features/inventory/storageoverlay/StorageOverlayScreen.kt b/src/main/kotlin/features/inventory/storageoverlay/StorageOverlayScreen.kt index 633a8fe..63a2f54 100644 --- a/src/main/kotlin/features/inventory/storageoverlay/StorageOverlayScreen.kt +++ b/src/main/kotlin/features/inventory/storageoverlay/StorageOverlayScreen.kt @@ -357,6 +357,10 @@ class StorageOverlayScreen : Screen(Text.literal("")) { return super.keyReleased(keyCode, scanCode, modifiers) } + override fun shouldCloseOnEsc(): Boolean { + return this === MC.screen // Fixes this UI closing the handled screen on Escape press. + } + override fun keyPressed(keyCode: Int, scanCode: Int, modifiers: Int): Boolean { if (typeMCComponentInPlace( controlComponent, -- cgit