Add 4 pixel padding on top of chest frames

This commit is contained in:
DBotThePony 2023-08-20 23:44:29 +07:00
parent 7569b3fe0a
commit 74cf2b42d0
Signed by: DBot
GPG Key ID: DCC23B5715498507

View File

@ -2,6 +2,7 @@ package ru.dbotthepony.mc.otm.compat.vanilla
import net.minecraft.network.chat.Component
import net.minecraft.world.entity.player.Inventory
import ru.dbotthepony.mc.otm.client.render.RenderGravity
import ru.dbotthepony.mc.otm.client.screen.MatteryScreen
import ru.dbotthepony.mc.otm.client.screen.panels.Dock
import ru.dbotthepony.mc.otm.client.screen.panels.FramePanel
@ -12,13 +13,14 @@ import ru.dbotthepony.mc.otm.client.screen.panels.util.GridPanel
class MatteryChestScreen(menu: MatteryChestMenu, inventory: Inventory, title: Component) : MatteryScreen<MatteryChestMenu>(menu, inventory, title) {
override fun makeMainFrame(): FramePanel<MatteryScreen<*>> {
val frame = FramePanel.padded(this, AbstractSlotPanel.SIZE * 9f, AbstractSlotPanel.SIZE * menu.rows, title)
val frame = FramePanel.padded(this, AbstractSlotPanel.SIZE * 9f, AbstractSlotPanel.SIZE * menu.rows + 4f, title)
frame.makeCloseButton()
frame.onClose { onClose() }
val grid = GridPanel.slots(this, frame, 9, menu.rows)
grid.dock = Dock.FILL
grid.gravity = RenderGravity.BOTTOM_CENTER
for (slot in menu.chestSlots)
SlotPanel(this, grid, slot)