Add 4 pixel padding on top of chest frames
This commit is contained in:
parent
7569b3fe0a
commit
74cf2b42d0
@ -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)
|
||||
|
Loading…
Reference in New Issue
Block a user