From 784930e396b92f581c603bb9ea99b5024f7b86d6 Mon Sep 17 00:00:00 2001 From: DBotThePony Date: Fri, 7 Mar 2025 09:26:54 +0700 Subject: [PATCH] Update AbstractProcessingMachineScreen to properly account for UserFilteredMenuSlot --- .../screen/tech/AbstractProcessingMachineScreen.kt | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/src/main/kotlin/ru/dbotthepony/mc/otm/client/screen/tech/AbstractProcessingMachineScreen.kt b/src/main/kotlin/ru/dbotthepony/mc/otm/client/screen/tech/AbstractProcessingMachineScreen.kt index 9409e8873..455788a82 100644 --- a/src/main/kotlin/ru/dbotthepony/mc/otm/client/screen/tech/AbstractProcessingMachineScreen.kt +++ b/src/main/kotlin/ru/dbotthepony/mc/otm/client/screen/tech/AbstractProcessingMachineScreen.kt @@ -12,9 +12,11 @@ import ru.dbotthepony.mc.otm.client.screen.panels.button.DeviceControls import ru.dbotthepony.mc.otm.client.screen.panels.slot.AbstractSlotPanel import ru.dbotthepony.mc.otm.client.screen.panels.slot.BatterySlotPanel import ru.dbotthepony.mc.otm.client.screen.panels.slot.SlotPanel +import ru.dbotthepony.mc.otm.client.screen.panels.slot.UserFilteredSlotPanel import ru.dbotthepony.mc.otm.client.screen.widget.ProgressGaugePanel import ru.dbotthepony.mc.otm.client.screen.widget.WideProfiledPowerGaugePanel import ru.dbotthepony.mc.otm.compat.jei.isJeiLoaded +import ru.dbotthepony.mc.otm.menu.UserFilteredMenuSlot import ru.dbotthepony.mc.otm.menu.tech.AbstractProcessingMachineMenu import kotlin.math.roundToInt @@ -50,9 +52,14 @@ open class AbstractProcessingMachineScreen(me row.dock = Dock.TOP row.dockBottom = 2f - SlotPanel(this, row, input).also { - it.dock = Dock.LEFT - } + if (input is UserFilteredMenuSlot) + UserFilteredSlotPanel(this, row, input).also { + it.dock = Dock.LEFT + } + else + SlotPanel(this, row, input).also { + it.dock = Dock.LEFT + } progressPanels.add(ProgressGaugePanel(this, row, progress).also { it.dock = Dock.LEFT