Move screens to subpackages

This commit is contained in:
DBotThePony 2023-01-26 21:57:22 +07:00
parent ff21380939
commit 68736860d9
Signed by: DBot
GPG Key ID: DCC23B5715498507
25 changed files with 85 additions and 40 deletions

View File

@ -0,0 +1,21 @@
package ru.dbotthepony.mc.otm.client.screen.decorative
import net.minecraft.network.chat.Component
import net.minecraft.world.entity.player.Inventory
import ru.dbotthepony.mc.otm.client.screen.MatteryScreen
import ru.dbotthepony.mc.otm.client.screen.panels.FramePanel
import ru.dbotthepony.mc.otm.client.screen.panels.GridPanel
import ru.dbotthepony.mc.otm.client.screen.panels.SlotPanel
import ru.dbotthepony.mc.otm.menu.decorative.CargoCrateMenu
class CargoCrateScreen(menu: CargoCrateMenu, inventory: Inventory, title: Component) : MatteryScreen<CargoCrateMenu>(menu, inventory, title) {
override fun makeMainFrame(): FramePanel<MatteryScreen<*>> {
val frame = FramePanel(this, null, 0f, 0f, INVENTORY_FRAME_WIDTH, 22f + 4f + 6f * 18f, getTitle())
val grid = GridPanel(this, frame, 8f, 18f, 9f * 18f, 6f * 18f, 9, 6)
for (slot in menu.storageSlots)
SlotPanel(this, grid, slot)
return frame
}
}

View File

@ -1,7 +1,8 @@
package ru.dbotthepony.mc.otm.client.screen
package ru.dbotthepony.mc.otm.client.screen.decorative
import net.minecraft.network.chat.Component
import net.minecraft.world.entity.player.Inventory
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
import ru.dbotthepony.mc.otm.client.screen.panels.input.NetworkedStringInputPanel

View File

@ -1,25 +1,13 @@
package ru.dbotthepony.mc.otm.client.screen
package ru.dbotthepony.mc.otm.client.screen.decorative
import net.minecraft.network.chat.Component
import net.minecraft.world.entity.player.Inventory
import ru.dbotthepony.mc.otm.client.screen.MatteryScreen
import ru.dbotthepony.mc.otm.client.screen.panels.FramePanel
import ru.dbotthepony.mc.otm.client.screen.panels.GridPanel
import ru.dbotthepony.mc.otm.client.screen.panels.SlotPanel
import ru.dbotthepony.mc.otm.menu.decorative.CargoCrateMenu
import ru.dbotthepony.mc.otm.menu.decorative.MinecartCargoCrateMenu
class CargoCrateScreen(menu: CargoCrateMenu, inventory: Inventory, title: Component) : MatteryScreen<CargoCrateMenu>(menu, inventory, title) {
override fun makeMainFrame(): FramePanel<MatteryScreen<*>> {
val frame = FramePanel(this, null, 0f, 0f, INVENTORY_FRAME_WIDTH, 22f + 4f + 6f * 18f, getTitle())
val grid = GridPanel(this, frame, 8f, 18f, 9f * 18f, 6f * 18f, 9, 6)
for (slot in menu.storageSlots)
SlotPanel(this, grid, slot)
return frame
}
}
class MinecartCargoCrateScreen(menu: MinecartCargoCrateMenu, inventory: Inventory, title: Component) : MatteryScreen<MinecartCargoCrateMenu>(menu, inventory, title) {
override fun makeMainFrame(): FramePanel<MatteryScreen<*>> {
val frame = FramePanel(this, null, 0f, 0f, INVENTORY_FRAME_WIDTH, 22f + 4f + 6f * 18f, getTitle())

View File

@ -1,7 +1,8 @@
package ru.dbotthepony.mc.otm.client.screen
package ru.dbotthepony.mc.otm.client.screen.matter
import net.minecraft.network.chat.Component
import net.minecraft.world.entity.player.Inventory
import ru.dbotthepony.mc.otm.client.screen.MatteryScreen
import ru.dbotthepony.mc.otm.core.TranslatableComponent
import ru.dbotthepony.mc.otm.client.screen.panels.*
import ru.dbotthepony.mc.otm.client.screen.panels.buttons.ButtonPanel

View File

@ -1,8 +1,9 @@
package ru.dbotthepony.mc.otm.client.screen
package ru.dbotthepony.mc.otm.client.screen.matter
import net.minecraft.network.chat.Component
import ru.dbotthepony.mc.otm.menu.matter.MatterCapacitorBankMenu
import net.minecraft.world.entity.player.Inventory
import ru.dbotthepony.mc.otm.client.screen.MatteryScreen
import ru.dbotthepony.mc.otm.client.screen.panels.FramePanel
import ru.dbotthepony.mc.otm.client.screen.panels.MatterCapacitorSlotPanel
import ru.dbotthepony.mc.otm.client.screen.widget.MatterGaugePanel

View File

@ -1,8 +1,9 @@
package ru.dbotthepony.mc.otm.client.screen
package ru.dbotthepony.mc.otm.client.screen.matter
import net.minecraft.network.chat.Component
import ru.dbotthepony.mc.otm.menu.matter.MatterDecomposerMenu
import net.minecraft.world.entity.player.Inventory
import ru.dbotthepony.mc.otm.client.screen.MatteryScreen
import ru.dbotthepony.mc.otm.client.screen.panels.BatterySlotPanel
import ru.dbotthepony.mc.otm.client.screen.panels.FramePanel
import ru.dbotthepony.mc.otm.client.screen.panels.SlotPanel

View File

@ -1,4 +1,4 @@
package ru.dbotthepony.mc.otm.client.screen
package ru.dbotthepony.mc.otm.client.screen.matter
import net.minecraft.ChatFormatting
import net.minecraft.client.gui.components.EditBox
@ -8,6 +8,7 @@ import net.minecraft.world.item.ItemStack
import ru.dbotthepony.mc.otm.capability.matter.IPatternState
import ru.dbotthepony.mc.otm.capability.matter.IReplicationTask
import ru.dbotthepony.mc.otm.client.render.WidgetLocation
import ru.dbotthepony.mc.otm.client.screen.MatteryScreen
import ru.dbotthepony.mc.otm.client.screen.panels.*
import ru.dbotthepony.mc.otm.client.screen.panels.buttons.ButtonPanel
import ru.dbotthepony.mc.otm.core.TranslatableComponent

View File

@ -1,7 +1,8 @@
package ru.dbotthepony.mc.otm.client.screen
package ru.dbotthepony.mc.otm.client.screen.matter
import net.minecraft.network.chat.Component
import net.minecraft.world.entity.player.Inventory
import ru.dbotthepony.mc.otm.client.screen.MatteryScreen
import ru.dbotthepony.mc.otm.client.screen.panels.BatterySlotPanel
import ru.dbotthepony.mc.otm.client.screen.panels.FramePanel
import ru.dbotthepony.mc.otm.client.screen.panels.SlotPanel

View File

@ -1,8 +1,9 @@
package ru.dbotthepony.mc.otm.client.screen
package ru.dbotthepony.mc.otm.client.screen.matter
import net.minecraft.network.chat.Component
import ru.dbotthepony.mc.otm.menu.MatterReplicatorMenu
import net.minecraft.world.entity.player.Inventory
import ru.dbotthepony.mc.otm.client.screen.MatteryScreen
import ru.dbotthepony.mc.otm.client.screen.panels.BatterySlotPanel
import ru.dbotthepony.mc.otm.client.screen.panels.FramePanel
import ru.dbotthepony.mc.otm.client.screen.panels.SlotPanel
@ -30,4 +31,4 @@ class MatterReplicatorScreen(p_97741_: MatterReplicatorMenu, p_97742_: Inventory
return frame
}
}
}

View File

@ -1,8 +1,9 @@
package ru.dbotthepony.mc.otm.client.screen
package ru.dbotthepony.mc.otm.client.screen.matter
import net.minecraft.network.chat.Component
import ru.dbotthepony.mc.otm.menu.matter.MatterScannerMenu
import net.minecraft.world.entity.player.Inventory
import ru.dbotthepony.mc.otm.client.screen.MatteryScreen
import ru.dbotthepony.mc.otm.client.screen.panels.BatterySlotPanel
import ru.dbotthepony.mc.otm.client.screen.panels.FramePanel
import ru.dbotthepony.mc.otm.client.screen.panels.SlotPanel

View File

@ -1,8 +1,9 @@
package ru.dbotthepony.mc.otm.client.screen
package ru.dbotthepony.mc.otm.client.screen.matter
import net.minecraft.network.chat.Component
import ru.dbotthepony.mc.otm.menu.matter.PatternStorageMenu
import net.minecraft.world.entity.player.Inventory
import ru.dbotthepony.mc.otm.client.screen.MatteryScreen
import ru.dbotthepony.mc.otm.client.screen.panels.FramePanel
import ru.dbotthepony.mc.otm.client.screen.panels.PatternSlotPanel
import ru.dbotthepony.mc.otm.client.screen.widget.PatternGaugePanel

View File

@ -1,8 +1,9 @@
package ru.dbotthepony.mc.otm.client.screen
package ru.dbotthepony.mc.otm.client.screen.storage
import net.minecraft.network.chat.Component
import ru.dbotthepony.mc.otm.menu.storage.DriveRackMenu
import net.minecraft.world.entity.player.Inventory
import ru.dbotthepony.mc.otm.client.screen.MatteryScreen
import ru.dbotthepony.mc.otm.client.screen.panels.BatterySlotPanel
import ru.dbotthepony.mc.otm.client.screen.panels.FramePanel
import ru.dbotthepony.mc.otm.client.screen.panels.SlotPanel

View File

@ -1,9 +1,10 @@
package ru.dbotthepony.mc.otm.client.screen
package ru.dbotthepony.mc.otm.client.screen.storage
import com.mojang.blaze3d.vertex.PoseStack
import net.minecraft.network.chat.Component
import net.minecraft.world.entity.player.Inventory
import net.minecraft.world.item.ItemStack
import ru.dbotthepony.mc.otm.client.screen.MatteryScreen
import ru.dbotthepony.mc.otm.core.TranslatableComponent
import ru.dbotthepony.mc.otm.client.screen.panels.*
import ru.dbotthepony.mc.otm.client.screen.panels.buttons.CheckBoxLabelInputPanel

View File

@ -1,4 +1,4 @@
package ru.dbotthepony.mc.otm.client.screen
package ru.dbotthepony.mc.otm.client.screen.storage
import com.mojang.blaze3d.systems.RenderSystem
import com.mojang.blaze3d.vertex.PoseStack
@ -12,6 +12,7 @@ import ru.dbotthepony.mc.otm.core.TranslatableComponent
import ru.dbotthepony.mc.otm.block.entity.storage.ItemMonitorPlayerSettings
import ru.dbotthepony.mc.otm.client.render.UVWindingOrder
import ru.dbotthepony.mc.otm.client.render.Widgets8
import ru.dbotthepony.mc.otm.client.screen.MatteryScreen
import ru.dbotthepony.mc.otm.client.screen.panels.*
import ru.dbotthepony.mc.otm.client.screen.panels.buttons.SmallEnumRectangleButtonPanel
import ru.dbotthepony.mc.otm.client.screen.widget.ProgressGaugePanel
@ -44,9 +45,9 @@ class ItemMonitorScreen(menu: ItemMonitorMenu, inventory: Inventory, title: Comp
frame.width = 178f + frame.dockPadding.left + frame.dockPadding.right
val viewScrollBar = DiscreteScrollBarPanel(this, topPanel,
{ integerDivisionDown(menu.networkedItemView.itemCount, ITEM_GRID_WIDTH) },
{ _, _, _ -> },
28f + ITEM_GRID_WIDTH * 18f + 2f, 16f, ITEM_GRID_HEIGHT * 18f)
{ integerDivisionDown(menu.networkedItemView.itemCount, ITEM_GRID_WIDTH) },
{ _, _, _ -> },
28f + ITEM_GRID_WIDTH * 18f + 2f, 16f, ITEM_GRID_HEIGHT * 18f)
viewScrollBar.dock = Dock.RIGHT
viewScrollBar.setDockMargin(left = 2f)

View File

@ -1,7 +1,8 @@
package ru.dbotthepony.mc.otm.client.screen
package ru.dbotthepony.mc.otm.client.screen.storage
import net.minecraft.network.chat.Component
import net.minecraft.world.entity.player.Inventory
import ru.dbotthepony.mc.otm.client.screen.MatteryScreen
import ru.dbotthepony.mc.otm.core.TranslatableComponent
import ru.dbotthepony.mc.otm.client.screen.panels.*
import ru.dbotthepony.mc.otm.client.screen.panels.buttons.CheckBoxLabelInputPanel

View File

@ -1,7 +1,8 @@
package ru.dbotthepony.mc.otm.client.screen
package ru.dbotthepony.mc.otm.client.screen.storage
import net.minecraft.network.chat.Component
import net.minecraft.world.entity.player.Inventory
import ru.dbotthepony.mc.otm.client.screen.MatteryScreen
import ru.dbotthepony.mc.otm.core.TranslatableComponent
import ru.dbotthepony.mc.otm.client.screen.panels.*
import ru.dbotthepony.mc.otm.client.screen.panels.buttons.CheckBoxLabelInputPanel

View File

@ -1,7 +1,8 @@
package ru.dbotthepony.mc.otm.client.screen
package ru.dbotthepony.mc.otm.client.screen.storage
import net.minecraft.network.chat.Component
import net.minecraft.world.entity.player.Inventory
import ru.dbotthepony.mc.otm.client.screen.MatteryScreen
import ru.dbotthepony.mc.otm.core.TranslatableComponent
import ru.dbotthepony.mc.otm.client.screen.panels.*
import ru.dbotthepony.mc.otm.client.screen.panels.buttons.CheckBoxLabelInputPanel

View File

@ -1,7 +1,8 @@
package ru.dbotthepony.mc.otm.client.screen
package ru.dbotthepony.mc.otm.client.screen.storage
import net.minecraft.network.chat.Component
import net.minecraft.world.entity.player.Inventory
import ru.dbotthepony.mc.otm.client.screen.MatteryScreen
import ru.dbotthepony.mc.otm.core.TranslatableComponent
import ru.dbotthepony.mc.otm.client.screen.panels.*
import ru.dbotthepony.mc.otm.client.screen.widget.HorizontalPowerGaugePanel

View File

@ -1,4 +1,4 @@
package ru.dbotthepony.mc.otm.client.screen
package ru.dbotthepony.mc.otm.client.screen.tech
import com.mojang.blaze3d.platform.InputConstants
import com.mojang.blaze3d.systems.RenderSystem
@ -25,6 +25,7 @@ import ru.dbotthepony.mc.otm.client.render.Widgets18
import ru.dbotthepony.mc.otm.client.render.drawColor
import ru.dbotthepony.mc.otm.client.render.drawLine
import ru.dbotthepony.mc.otm.client.render.drawRect
import ru.dbotthepony.mc.otm.client.screen.MatteryScreen
import ru.dbotthepony.mc.otm.client.screen.panels.*
import ru.dbotthepony.mc.otm.client.screen.panels.buttons.ButtonPanel
import ru.dbotthepony.mc.otm.client.screen.widget.WidePowerGaugePanel

View File

@ -1,8 +1,9 @@
package ru.dbotthepony.mc.otm.client.screen
package ru.dbotthepony.mc.otm.client.screen.tech
import net.minecraft.network.chat.Component
import ru.dbotthepony.mc.otm.menu.tech.BatteryBankMenu
import net.minecraft.world.entity.player.Inventory
import ru.dbotthepony.mc.otm.client.screen.MatteryScreen
import ru.dbotthepony.mc.otm.client.screen.panels.BatterySlotPanel
import ru.dbotthepony.mc.otm.client.screen.panels.FramePanel
import ru.dbotthepony.mc.otm.client.screen.widget.WidePowerGaugePanel

View File

@ -1,7 +1,8 @@
package ru.dbotthepony.mc.otm.client.screen
package ru.dbotthepony.mc.otm.client.screen.tech
import net.minecraft.network.chat.Component
import net.minecraft.world.entity.player.Inventory
import ru.dbotthepony.mc.otm.client.screen.MatteryScreen
import ru.dbotthepony.mc.otm.core.TranslatableComponent
import ru.dbotthepony.mc.otm.client.screen.panels.*
import ru.dbotthepony.mc.otm.client.screen.widget.ProgressGaugePanel

View File

@ -1,7 +1,8 @@
package ru.dbotthepony.mc.otm.client.screen
package ru.dbotthepony.mc.otm.client.screen.tech
import net.minecraft.network.chat.Component
import net.minecraft.world.entity.player.Inventory
import ru.dbotthepony.mc.otm.client.screen.MatteryScreen
import ru.dbotthepony.mc.otm.core.TranslatableComponent
import ru.dbotthepony.mc.otm.client.screen.panels.*
import ru.dbotthepony.mc.otm.client.screen.panels.buttons.ButtonPanel

View File

@ -1,8 +1,9 @@
package ru.dbotthepony.mc.otm.client.screen
package ru.dbotthepony.mc.otm.client.screen.tech
import com.mojang.blaze3d.vertex.PoseStack
import net.minecraft.network.chat.Component
import net.minecraft.world.entity.player.Inventory
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.BatterySlotPanel
import ru.dbotthepony.mc.otm.client.screen.panels.Dock

View File

@ -1,7 +1,8 @@
package ru.dbotthepony.mc.otm.client.screen
package ru.dbotthepony.mc.otm.client.screen.tech
import net.minecraft.network.chat.Component
import net.minecraft.world.entity.player.Inventory
import ru.dbotthepony.mc.otm.client.screen.MatteryScreen
import ru.dbotthepony.mc.otm.client.screen.panels.BatterySlotPanel
import ru.dbotthepony.mc.otm.client.screen.panels.FramePanel
import ru.dbotthepony.mc.otm.client.screen.panels.SlotPanel

View File

@ -8,6 +8,20 @@ import net.minecraftforge.registries.DeferredRegister
import net.minecraftforge.registries.ForgeRegistries
import ru.dbotthepony.mc.otm.OverdriveThatMatters
import ru.dbotthepony.mc.otm.client.screen.*
import ru.dbotthepony.mc.otm.client.screen.decorative.CargoCrateScreen
import ru.dbotthepony.mc.otm.client.screen.decorative.MinecartCargoCrateScreen
import ru.dbotthepony.mc.otm.client.screen.matter.MatterBottlerScreen
import ru.dbotthepony.mc.otm.client.screen.matter.MatterCapacitorBankScreen
import ru.dbotthepony.mc.otm.client.screen.matter.MatterDecomposerScreen
import ru.dbotthepony.mc.otm.client.screen.matter.MatterRecyclerScreen
import ru.dbotthepony.mc.otm.client.screen.storage.DriveRackScreen
import ru.dbotthepony.mc.otm.client.screen.storage.StorageBusScreen
import ru.dbotthepony.mc.otm.client.screen.storage.StorageExporterScreen
import ru.dbotthepony.mc.otm.client.screen.storage.StorageImporterScreen
import ru.dbotthepony.mc.otm.client.screen.storage.StoragePowerSupplierScreen
import ru.dbotthepony.mc.otm.client.screen.tech.EnergyCounterScreen
import ru.dbotthepony.mc.otm.client.screen.tech.EnergyServoScreen
import ru.dbotthepony.mc.otm.client.screen.tech.PlatePressScreen
import ru.dbotthepony.mc.otm.menu.*
import ru.dbotthepony.mc.otm.menu.decorative.CargoCrateMenu
import ru.dbotthepony.mc.otm.menu.decorative.HoloSignMenu