aboutsummaryrefslogtreecommitdiff
path: root/src/main/kotlin/features/inventory
diff options
context:
space:
mode:
authorLinnea Gräf <nea@nea.moe>2025-03-21 23:46:34 +0100
committerLinnea Gräf <nea@nea.moe>2025-03-21 23:46:34 +0100
commitaa327dcfd0bb09b42ca28dbfd9361ca9340351d6 (patch)
tree34c2b8e354437202dfa44a48bcd7b7f54c615980 /src/main/kotlin/features/inventory
parentd42a6c7ad506a7cb0e912540bc6408773438a74c (diff)
downloadFirmament-master.tar.gz
Firmament-master.tar.bz2
Firmament-master.zip
fix: Not being able to mine after closing the storage overlayHEADmaster
Diffstat (limited to 'src/main/kotlin/features/inventory')
-rw-r--r--src/main/kotlin/features/inventory/storageoverlay/StorageOverlayScreen.kt4
1 files changed, 4 insertions, 0 deletions
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,