From 87276e22ed34754f14703b06def0bab77527f052 Mon Sep 17 00:00:00 2001 From: DBotThePony Date: Sat, 14 Jan 2023 14:29:33 +0700 Subject: [PATCH] oops --- .../mc/otm/capability/energy/IMatteryEnergyStorage.kt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/main/kotlin/ru/dbotthepony/mc/otm/capability/energy/IMatteryEnergyStorage.kt b/src/main/kotlin/ru/dbotthepony/mc/otm/capability/energy/IMatteryEnergyStorage.kt index 2e6986c6b..e8241fd3a 100644 --- a/src/main/kotlin/ru/dbotthepony/mc/otm/capability/energy/IMatteryEnergyStorage.kt +++ b/src/main/kotlin/ru/dbotthepony/mc/otm/capability/energy/IMatteryEnergyStorage.kt @@ -88,10 +88,10 @@ interface IMatteryEnergyStorage : IEnergyStorage { fun receiveEnergyChecked(howMuch: Decimal, simulate: Boolean): Decimal { require(!howMuch.isNegative) { "Negative amount of energy: $howMuch" } - if (!energyFlow.output) + if (!energyFlow.input) return Decimal.ZERO - return extractEnergy(howMuch, simulate) + return receiveEnergy(howMuch, simulate) } /**