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) {