From f7e3166ca0af2759aa4741f22f341ca0eee12ad0 Mon Sep 17 00:00:00 2001 From: DBotThePony Date: Sun, 14 Jan 2024 00:28:06 +0700 Subject: [PATCH] Fix wrong argument order inside children panels --- .../mc/otm/client/screen/matter/MatterPanelScreen.kt | 2 +- .../mc/otm/client/screen/tech/EssenceStorageScreen.kt | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/main/kotlin/ru/dbotthepony/mc/otm/client/screen/matter/MatterPanelScreen.kt b/src/main/kotlin/ru/dbotthepony/mc/otm/client/screen/matter/MatterPanelScreen.kt index b1d960325..b8cc65f16 100644 --- a/src/main/kotlin/ru/dbotthepony/mc/otm/client/screen/matter/MatterPanelScreen.kt +++ b/src/main/kotlin/ru/dbotthepony/mc/otm/client/screen/matter/MatterPanelScreen.kt @@ -109,7 +109,7 @@ class MatterPanelScreen( placeholder = TranslatableComponent("otm.gui.quicksearch") } - override fun onTextChanged(old: String, new: String) { + override fun onTextChanged(new: String, old: String) { if (new == "") { menu.filter = Predicate { true } } else { diff --git a/src/main/kotlin/ru/dbotthepony/mc/otm/client/screen/tech/EssenceStorageScreen.kt b/src/main/kotlin/ru/dbotthepony/mc/otm/client/screen/tech/EssenceStorageScreen.kt index 011dc31de..970f19148 100644 --- a/src/main/kotlin/ru/dbotthepony/mc/otm/client/screen/tech/EssenceStorageScreen.kt +++ b/src/main/kotlin/ru/dbotthepony/mc/otm/client/screen/tech/EssenceStorageScreen.kt @@ -223,7 +223,7 @@ class EssenceStorageScreen(menu: EssenceStorageMenu, inventory: Inventory, title playGuiClickSound() } - override fun onTextChanged(old: String, new: String) { + override fun onTextChanged(new: String, old: String) { customDispense = (new.toIntOrNull() ?: 30).coerceAtLeast(1) } }