From 15b718f28ad739a99c3f5cf5e04858ed2ea4cd82 Mon Sep 17 00:00:00 2001 From: DBotThePony Date: Mon, 21 Aug 2023 00:27:32 +0700 Subject: [PATCH] Enable inventory scrollbar when having exopack installed, and not having at least 1 extra slot in it --- .../dbotthepony/mc/otm/client/screen/MatteryScreen.kt | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/src/main/kotlin/ru/dbotthepony/mc/otm/client/screen/MatteryScreen.kt b/src/main/kotlin/ru/dbotthepony/mc/otm/client/screen/MatteryScreen.kt index 64abf7566..e51b3e857 100644 --- a/src/main/kotlin/ru/dbotthepony/mc/otm/client/screen/MatteryScreen.kt +++ b/src/main/kotlin/ru/dbotthepony/mc/otm/client/screen/MatteryScreen.kt @@ -209,12 +209,9 @@ abstract class MatteryScreen(menu: T, inventory: Inventory, tit if (menu.playerInventorySlots.isNotEmpty() && menu.autoCreateInventoryFrame) { val deviceControls: DeviceControls> - if (menu.playerCombinedInventorySlots.size <= 27) { + if (menu.player.matteryPlayer?.hasExopack != true) { inventoryFrame = FramePanel>(this, null, 0f, 0f, INVENTORY_FRAME_WIDTH, INVENTORY_FRAME_HEIGHT, inventory.displayName).also(this::addPanel) - inventoryFrame!!.makeHelpButton().addSlotFiltersHelp().also { - if (menu.player.matteryPlayer?.hasExopack == true) - it.tooltips.add(TranslatableComponent("otm.gui.help.slot_charging")) - } + inventoryFrame!!.makeHelpButton().addSlotFiltersHelp() deviceControls = DeviceControls(this, inventoryFrame!!) @@ -247,8 +244,7 @@ abstract class MatteryScreen(menu: T, inventory: Inventory, tit } else { inventoryFrame = FramePanel>(this, null, 0f, 0f, INVENTORY_FRAME_WIDTH_EXTENDED, BASE_INVENTORY_FRAME_HEIGHT + AbstractSlotPanel.SIZE * inventoryRows, inventory.displayName).also(this::addPanel) inventoryFrame!!.makeHelpButton().addSlotFiltersHelp().also { - if (menu.player.matteryPlayer?.hasExopack == true) - it.tooltips.add(TranslatableComponent("otm.gui.help.slot_charging")) + it.tooltips.add(TranslatableComponent("otm.gui.help.slot_charging")) } deviceControls = DeviceControls(this, inventoryFrame!!)