aboutsummaryrefslogtreecommitdiff
path: root/src/main/kotlin
diff options
context:
space:
mode:
authorLinnea Gräf <nea@nea.moe>2025-07-01 14:50:29 +0200
committerLinnea Gräf <nea@nea.moe>2025-07-01 14:50:29 +0200
commit269e988f9920c695f86aa423b72ae2776c3ed1b9 (patch)
treef8e2f5481292a9b10c66696c69bb330a0de78fa8 /src/main/kotlin
parent3518f881c2590053c66ea93e212fcf3bada58366 (diff)
downloadFirmament-269e988f9920c695f86aa423b72ae2776c3ed1b9.tar.gz
Firmament-269e988f9920c695f86aa423b72ae2776c3ed1b9.tar.bz2
Firmament-269e988f9920c695f86aa423b72ae2776c3ed1b9.zip
fix: storage overlay "edit pages" being misaligned
closes https://github.com/nea89o/Firmament/issues/120
Diffstat (limited to 'src/main/kotlin')
-rw-r--r--src/main/kotlin/features/inventory/storageoverlay/StorageOverlayScreen.kt13
1 files changed, 8 insertions, 5 deletions
diff --git a/src/main/kotlin/features/inventory/storageoverlay/StorageOverlayScreen.kt b/src/main/kotlin/features/inventory/storageoverlay/StorageOverlayScreen.kt
index f1cbea7..84d0f2b 100644
--- a/src/main/kotlin/features/inventory/storageoverlay/StorageOverlayScreen.kt
+++ b/src/main/kotlin/features/inventory/storageoverlay/StorageOverlayScreen.kt
@@ -154,11 +154,14 @@ class StorageOverlayScreen : Screen(Text.literal("")) {
fun editPages() {
isExiting = true
- val hs = MC.screen as? HandledScreen<*>
- if (StorageBackingHandle.fromScreen(hs) is StorageBackingHandle.Overview) {
- hs.customGui = null
- } else {
- MC.sendCommand("storage")
+ MC.instance.send {
+ val hs = MC.screen as? HandledScreen<*>
+ if (StorageBackingHandle.fromScreen(hs) is StorageBackingHandle.Overview) {
+ hs.customGui = null
+ hs.init(MC.instance, width, height)
+ } else {
+ MC.sendCommand("storage")
+ }
}
}