From 203f4e56c977b7918714bd2581786c97cfd33335 Mon Sep 17 00:00:00 2001 From: YuRaNnNzZZ Date: Tue, 11 Jul 2023 19:02:32 +0300 Subject: [PATCH] =?UTF-8?q?YuRaNnNzZZ=20=E2=80=94=20=D0=92=D1=87=D0=B5?= =?UTF-8?q?=D1=80=D0=B0,=20=D0=B2=2020:54=20=D0=BC=D0=BD=D0=B5=20=D0=BA?= =?UTF-8?q?=D0=B0=D0=B6=D0=B5=D1=82=D1=81=D1=8F=20=D0=BD=D0=B0=D0=B4=D0=BE?= =?UTF-8?q?=20=D0=B7=D0=B0=D0=B4=D0=B0=D1=82=D1=8C=20=D0=BC=D0=B0=D0=BA?= =?UTF-8?q?=D1=81=D0=B8=D0=BC=D0=B0=D0=BB=D1=8C=D0=BD=D1=8B=D0=B9=20=D1=80?= =?UTF-8?q?=D0=B0=D0=B7=D0=BC=D0=B5=D1=80=20=D1=81=D1=82=D0=B0=D0=BA=D0=B0?= =?UTF-8?q?=201=20=D0=B2=20=D0=B1=D0=B0=D0=BD=D0=BA=D0=B0=D1=85=20:WiseTre?= =?UTF-8?q?e:?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../otm/block/entity/matter/MatterCapacitorBankBlockEntity.kt | 2 ++ .../mc/otm/block/entity/matter/PatternStorageBlockEntity.kt | 4 +--- .../mc/otm/block/entity/tech/BatteryBankBlockEntity.kt | 2 ++ 3 files changed, 5 insertions(+), 3 deletions(-) diff --git a/src/main/kotlin/ru/dbotthepony/mc/otm/block/entity/matter/MatterCapacitorBankBlockEntity.kt b/src/main/kotlin/ru/dbotthepony/mc/otm/block/entity/matter/MatterCapacitorBankBlockEntity.kt index ba365952a..a45fd8958 100644 --- a/src/main/kotlin/ru/dbotthepony/mc/otm/block/entity/matter/MatterCapacitorBankBlockEntity.kt +++ b/src/main/kotlin/ru/dbotthepony/mc/otm/block/entity/matter/MatterCapacitorBankBlockEntity.kt @@ -126,6 +126,8 @@ class MatterCapacitorBankBlockEntity(p_155229_: BlockPos, p_155230_: BlockState) capacitorStatus[slot].boolean = new.getCapability(MatteryCapability.MATTER).isPresent gaugeLevel = (storedMatter / maxStoredMatter).toFloat() } + + override fun getMaxStackSize(): Int = 1 }.also(::addDroppableContainer) val itemConfig = ConfigurableItemHandler(inputOutput = container.handler(object : HandlerFilter { diff --git a/src/main/kotlin/ru/dbotthepony/mc/otm/block/entity/matter/PatternStorageBlockEntity.kt b/src/main/kotlin/ru/dbotthepony/mc/otm/block/entity/matter/PatternStorageBlockEntity.kt index 59230312f..1e4e0a821 100644 --- a/src/main/kotlin/ru/dbotthepony/mc/otm/block/entity/matter/PatternStorageBlockEntity.kt +++ b/src/main/kotlin/ru/dbotthepony/mc/otm/block/entity/matter/PatternStorageBlockEntity.kt @@ -54,9 +54,7 @@ class PatternStorageBlockEntity(p_155229_: BlockPos, p_155230_: BlockState) : super.setChanged(slot, new, old) } - override fun getMaxStackSize(): Int { - return 1 - } + override fun getMaxStackSize(): Int = 1 }.also(::addDroppableContainer) private fun updateBlockstate() { diff --git a/src/main/kotlin/ru/dbotthepony/mc/otm/block/entity/tech/BatteryBankBlockEntity.kt b/src/main/kotlin/ru/dbotthepony/mc/otm/block/entity/tech/BatteryBankBlockEntity.kt index f610bbe08..8e429535c 100644 --- a/src/main/kotlin/ru/dbotthepony/mc/otm/block/entity/tech/BatteryBankBlockEntity.kt +++ b/src/main/kotlin/ru/dbotthepony/mc/otm/block/entity/tech/BatteryBankBlockEntity.kt @@ -35,6 +35,8 @@ class BatteryBankBlockEntity(p_155229_: BlockPos, p_155230_: BlockState) : Matte batteryStatus[slot].boolean = new.getCapability(ForgeCapabilities.ENERGY).isPresent gaugeLevel = batteryLevel.percentage(maxBatteryLevel) } + + override fun getMaxStackSize(): Int = 1 }.also(::addDroppableContainer) val batteryStatus = immutableList(CAPACITY) {