Naming
This commit is contained in:
parent
bdb6aa1c21
commit
5b245ec564
@ -13,14 +13,14 @@ class PatternStorageScreen(p_97741_: PatternStorageMenu, p_97742_: Inventory, p_
|
||||
val frame = super.makeMainFrame()!!
|
||||
|
||||
|
||||
val m = PatternGaugePanel(this, frame, menu.stored_this, LEFT_MARGIN, GAUGE_TOP_WITHOUT_SLOT)
|
||||
PatternGaugePanel(this, frame, menu.stored_grid, LEFT_MARGIN + m.width, GAUGE_TOP_WITHOUT_SLOT)
|
||||
val m = PatternGaugePanel(this, frame, menu.storedThis, LEFT_MARGIN, GAUGE_TOP_WITHOUT_SLOT)
|
||||
PatternGaugePanel(this, frame, menu.storedGrid, LEFT_MARGIN + m.width, GAUGE_TOP_WITHOUT_SLOT)
|
||||
|
||||
for (i in 0 until 4)
|
||||
SlotPanel(this, frame, menu.pattern_slots[i], 62f + i * 18, 32f)
|
||||
SlotPanel(this, frame, menu.patternSlots[i], 62f + i * 18, 32f)
|
||||
|
||||
for (i in 4 until 8)
|
||||
SlotPanel(this, frame, menu.pattern_slots[i], 62f + (i - 4) * 18, 32f + 18f)
|
||||
SlotPanel(this, frame, menu.patternSlots[i], 62f + (i - 4) * 18, 32f + 18f)
|
||||
|
||||
return frame
|
||||
}
|
||||
|
@ -4,7 +4,6 @@ import net.minecraft.world.SimpleContainer
|
||||
import net.minecraft.world.entity.player.Inventory
|
||||
import ru.dbotthepony.mc.otm.block.entity.PatternStorageBlockEntity
|
||||
import ru.dbotthepony.mc.otm.core.ImpreciseFraction
|
||||
import ru.dbotthepony.mc.otm.graph.matter.MatterNetworkGraph
|
||||
import ru.dbotthepony.mc.otm.menu.widget.LevelGaugeWidget
|
||||
import ru.dbotthepony.mc.otm.registry.MMenus
|
||||
|
||||
@ -15,17 +14,17 @@ class PatternStorageMenu @JvmOverloads constructor(
|
||||
) : MatteryMenu(
|
||||
MMenus.PATTERN_STORAGE, p_38852_, inventory!!, tile
|
||||
) {
|
||||
val pattern_slots = arrayOfNulls<PatternSlot>(2 * 4)
|
||||
val stored_this: LevelGaugeWidget
|
||||
val stored_grid: LevelGaugeWidget
|
||||
val patternSlots = arrayOfNulls<PatternSlot>(2 * 4)
|
||||
val storedThis: LevelGaugeWidget
|
||||
val storedGrid: LevelGaugeWidget
|
||||
|
||||
init {
|
||||
if (tile == null) {
|
||||
stored_this = LevelGaugeWidget(this)
|
||||
stored_grid = LevelGaugeWidget(this)
|
||||
storedThis = LevelGaugeWidget(this)
|
||||
storedGrid = LevelGaugeWidget(this)
|
||||
} else {
|
||||
stored_this = LevelGaugeWidget(this, tile)
|
||||
stored_grid = LevelGaugeWidget(this, {
|
||||
storedThis = LevelGaugeWidget(this, tile)
|
||||
storedGrid = LevelGaugeWidget(this, {
|
||||
ImpreciseFraction(tile.matterGraph?.getPatternCount() ?: 0)
|
||||
}, {
|
||||
ImpreciseFraction(tile.matterGraph?.getPatternCapacity() ?: 0)
|
||||
@ -36,8 +35,8 @@ class PatternStorageMenu @JvmOverloads constructor(
|
||||
|
||||
for (row in 0..1) {
|
||||
for (column in 0..3) {
|
||||
pattern_slots[row * 4 + column] = PatternSlot(patterns, row * 4 + column, 48 + column * 20, 27 + row * 24)
|
||||
addSlot(pattern_slots[row * 4 + column]!!)
|
||||
patternSlots[row * 4 + column] = PatternSlot(patterns, row * 4 + column, 48 + column * 20, 27 + row * 24)
|
||||
addSlot(patternSlots[row * 4 + column]!!)
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user