diff --git a/src/main/kotlin/ru/dbotthepony/mc/otm/block/entity/BlockEntityCargoCrate.kt b/src/main/kotlin/ru/dbotthepony/mc/otm/block/entity/BlockEntityCargoCrate.kt index 8c74ccf49..03f4937c1 100644 --- a/src/main/kotlin/ru/dbotthepony/mc/otm/block/entity/BlockEntityCargoCrate.kt +++ b/src/main/kotlin/ru/dbotthepony/mc/otm/block/entity/BlockEntityCargoCrate.kt @@ -24,7 +24,7 @@ class BlockEntityCargoCrate( p_155229_: BlockPos, p_155230_: BlockState ) : BlockEntityMattery(Registry.BlockEntities.CARGO_CRATE, p_155229_, p_155230_) { - val container = MatteryContainer(this::setChanged, 9 * 6) + val container = MatteryContainer(this::setChanged, CAPACITY) private var interactingPlayers = 0 val handler = container.handler() @@ -77,5 +77,6 @@ class BlockEntityCargoCrate( companion object { private val NAME = TranslatableComponent("block.overdrive_that_matters.cargo_crate") + const val CAPACITY = 9 * 6 } } \ No newline at end of file diff --git a/src/main/kotlin/ru/dbotthepony/mc/otm/menu/CargoCrateMenu.kt b/src/main/kotlin/ru/dbotthepony/mc/otm/menu/CargoCrateMenu.kt index e11e4d1d0..5d17f268b 100644 --- a/src/main/kotlin/ru/dbotthepony/mc/otm/menu/CargoCrateMenu.kt +++ b/src/main/kotlin/ru/dbotthepony/mc/otm/menu/CargoCrateMenu.kt @@ -14,9 +14,9 @@ class CargoCrateMenu @JvmOverloads constructor( val crateSlots: Array init { - val container = tile?.container ?: SimpleContainer(9 * 6) + val container = tile?.container ?: SimpleContainer(BlockEntityCargoCrate.CAPACITY) - crateSlots = Array(9 * 6) { + crateSlots = Array(BlockEntityCargoCrate.CAPACITY) { val slot = MatterySlot(container, it) addSlot(slot) return@Array slot