diff --git a/src/main/kotlin/ru/dbotthepony/mc/otm/block/entity/BatteryBankBlockEntity.kt b/src/main/kotlin/ru/dbotthepony/mc/otm/block/entity/BatteryBankBlockEntity.kt index 576bfa4ed..f1c1335d9 100644 --- a/src/main/kotlin/ru/dbotthepony/mc/otm/block/entity/BatteryBankBlockEntity.kt +++ b/src/main/kotlin/ru/dbotthepony/mc/otm/block/entity/BatteryBankBlockEntity.kt @@ -95,9 +95,9 @@ class BatteryBankBlockEntity(p_155229_: BlockPos, p_155230_: BlockState) : Matte val diff: ImpreciseFraction if (isReceiving) { - diff = it.receiveEnergy(ImpreciseFraction.LONG_MAX_VALUE, true) + diff = it.receiveEnergy(it.maxEnergyStoredMattery, true) } else { - diff = it.extractEnergy(ImpreciseFraction.LONG_MAX_VALUE, true) + diff = it.extractEnergy(it.energyStoredMattery, true) } distribution[i] = diff