Do not allow energy go through if we have more than 1 item in stack
This commit is contained in:
parent
5603970654
commit
d8f2f44b5f
@ -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")
|
||||
|
Loading…
Reference in New Issue
Block a user