diff --git a/src/main/kotlin/ru/dbotthepony/mc/otm/capability/EnergyStorageImpl.kt b/src/main/kotlin/ru/dbotthepony/mc/otm/capability/EnergyStorageImpl.kt index f7d19ca9c..d863cc37c 100644 --- a/src/main/kotlin/ru/dbotthepony/mc/otm/capability/EnergyStorageImpl.kt +++ b/src/main/kotlin/ru/dbotthepony/mc/otm/capability/EnergyStorageImpl.kt @@ -74,7 +74,7 @@ sealed class ItemEnergyStorageImpl( } override fun extractEnergyInner(howMuch: ImpreciseFraction, simulate: Boolean): ImpreciseFraction { - if (!howMuch.isPositive) + if (!howMuch.isPositive || itemStack.count != 1) return ImpreciseFraction.ZERO @Suppress("NAME_SHADOWING") @@ -101,7 +101,7 @@ sealed class ItemEnergyStorageImpl( } override fun receiveEnergyInner(howMuch: ImpreciseFraction, simulate: Boolean): ImpreciseFraction { - if (!howMuch.isPositive) + if (!howMuch.isPositive || itemStack.count != 1) return ImpreciseFraction.ZERO @Suppress("NAME_SHADOWING")