diff --git a/src/main/kotlin/ru/dbotthepony/mc/otm/client/ClientEventHandler.kt b/src/main/kotlin/ru/dbotthepony/mc/otm/client/ClientEventHandler.kt index 8602425bf..bde02c326 100644 --- a/src/main/kotlin/ru/dbotthepony/mc/otm/client/ClientEventHandler.kt +++ b/src/main/kotlin/ru/dbotthepony/mc/otm/client/ClientEventHandler.kt @@ -18,7 +18,7 @@ import ru.dbotthepony.mc.otm.capability.MatteryPlayerCapability import ru.dbotthepony.mc.otm.capability.matteryPlayer import ru.dbotthepony.mc.otm.client.render.UVWindingOrder import ru.dbotthepony.mc.otm.client.render.Widgets18 -import ru.dbotthepony.mc.otm.client.screen.ExoSuitInventoryScreen +import ru.dbotthepony.mc.otm.client.screen.ExoPackInventoryScreen import ru.dbotthepony.mc.otm.client.screen.MatteryScreen import ru.dbotthepony.mc.otm.client.screen.panels.AbstractSlotPanel import ru.dbotthepony.mc.otm.client.screen.panels.DiscreteScrollBarPanel @@ -95,7 +95,7 @@ private fun inventoryLogic(event: ScreenEvent.Init.Post) { val mouseY = minecraft.mouseHandler.ypos() event.screen.onClose() - minecraft.setScreen(ExoSuitInventoryScreen(player.exoPackMenu)) + minecraft.setScreen(ExoPackInventoryScreen(player.exoPackMenu)) InputConstants.grabOrReleaseMouse(minecraft.window.window, 212993, mouseX, mouseY) }).also { it.tooltip = TranslatableComponent("otm.gui.exosuit.go_in") }) @@ -250,6 +250,6 @@ fun onScreenOpen(event: ScreenEvent.Opening) { val player = minecraft.player?.matteryPlayer ?: return if (player.hasExoPack && event.newScreen is InventoryScreen) { - event.newScreen = ExoSuitInventoryScreen(player.exoPackMenu) + event.newScreen = ExoPackInventoryScreen(player.exoPackMenu) } } diff --git a/src/main/kotlin/ru/dbotthepony/mc/otm/client/screen/ExoSuitInventoryScreen.kt b/src/main/kotlin/ru/dbotthepony/mc/otm/client/screen/ExoPackInventoryScreen.kt similarity index 94% rename from src/main/kotlin/ru/dbotthepony/mc/otm/client/screen/ExoSuitInventoryScreen.kt rename to src/main/kotlin/ru/dbotthepony/mc/otm/client/screen/ExoPackInventoryScreen.kt index ff130756c..9489bb4b4 100644 --- a/src/main/kotlin/ru/dbotthepony/mc/otm/client/screen/ExoSuitInventoryScreen.kt +++ b/src/main/kotlin/ru/dbotthepony/mc/otm/client/screen/ExoPackInventoryScreen.kt @@ -18,9 +18,9 @@ import ru.dbotthepony.mc.otm.network.MatteryPlayerNetworkChannel import yalter.mousetweaks.api.MouseTweaksDisableWheelTweak @MouseTweaksDisableWheelTweak -class ExoSuitInventoryScreen(menu: ExoPackInventoryMenu) : MatteryScreen(menu, TranslatableComponent("otm.gui.exosuit")) { - private lateinit var mainInventoryLine: EditablePanel - private lateinit var scrollPanel: DiscreteScrollBarPanel +class ExoPackInventoryScreen(menu: ExoPackInventoryMenu) : MatteryScreen(menu, TranslatableComponent("otm.gui.exopack")) { + private lateinit var mainInventoryLine: EditablePanel + private lateinit var scrollPanel: DiscreteScrollBarPanel override fun updateInventoryRows(old: Int) { mainFrame!!.height = FRAME_BASE_HEIGHT + inventoryRows * AbstractSlotPanel.SIZE @@ -67,7 +67,7 @@ class ExoSuitInventoryScreen(menu: ExoPackInventoryMenu) : MatteryScreen(this@ExoSuitInventoryScreen, frame, height = AbstractSlotPanel.SIZE * inventoryRows) { + mainInventoryLine = object : EditablePanel(this@ExoPackInventoryScreen, frame, height = AbstractSlotPanel.SIZE * inventoryRows) { override fun mouseScrolledInner(x: Double, y: Double, scroll: Double): Boolean { return scrollPanel.mouseScrolledInner(x, y, scroll) } @@ -132,8 +132,8 @@ class ExoSuitInventoryScreen(menu: ExoPackInventoryMenu) : MatteryScreen( - this@ExoSuitInventoryScreen, + object : EditablePanel( + this@ExoPackInventoryScreen, craftingCanvas, x = craftingSlotsCanvas.width, width = craftingCanvas.width - resultPanel.width - craftingSlotsCanvas.width, diff --git a/src/main/kotlin/ru/dbotthepony/mc/otm/client/screen/panels/EntityRendererPanel.kt b/src/main/kotlin/ru/dbotthepony/mc/otm/client/screen/panels/EntityRendererPanel.kt index 715de1e61..d38d25977 100644 --- a/src/main/kotlin/ru/dbotthepony/mc/otm/client/screen/panels/EntityRendererPanel.kt +++ b/src/main/kotlin/ru/dbotthepony/mc/otm/client/screen/panels/EntityRendererPanel.kt @@ -9,7 +9,7 @@ import net.minecraft.world.entity.player.Player import ru.dbotthepony.mc.otm.capability.matteryPlayer import ru.dbotthepony.mc.otm.client.render.Widgets8 import ru.dbotthepony.mc.otm.client.render.element -import ru.dbotthepony.mc.otm.client.screen.ExoSuitInventoryScreen +import ru.dbotthepony.mc.otm.client.screen.ExoPackInventoryScreen import ru.dbotthepony.mc.otm.client.screen.panels.buttons.SmallBooleanRectangleButtonPanel import ru.dbotthepony.mc.otm.compat.cos.CosmeticToggleRenderButton import ru.dbotthepony.mc.otm.compat.cos.isCosmeticArmorLoaded @@ -123,7 +123,7 @@ class EntityRendererPanel @JvmOverloads constructor( } override fun innerRender(stack: PoseStack, mouseX: Float, mouseY: Float, partialTick: Float) { - ExoSuitInventoryScreen.ENTITY_RECTANGLE.render(stack) + ExoPackInventoryScreen.ENTITY_RECTANGLE.render(stack) } companion object {