mirror of
https://github.com/Ellpeck/ActuallyAdditions.git
synced 2024-11-22 07:13:28 +01:00
Fixed corner case (cough mekanism) where in a energy storage accepts a simulated transfer, but refuses the actual transfer.
This commit is contained in:
parent
ae9c72bb73
commit
9fe3fa1c7c
1 changed files with 5 additions and 3 deletions
|
@ -218,10 +218,12 @@ public class TileEntityLaserRelayEnergy extends TileEntityLaserRelay {
|
|||
if (deduct >= theoreticalReceived) { //Happens with small numbers
|
||||
deduct = 0;
|
||||
}
|
||||
|
||||
trans += cap.receiveEnergy(theoreticalReceived - deduct, simulate);
|
||||
int actual = cap.receiveEnergy(theoreticalReceived - deduct, simulate);
|
||||
if (actual > 0) {
|
||||
trans += actual;
|
||||
trans += deduct;
|
||||
}
|
||||
}
|
||||
|
||||
return trans;
|
||||
}).orElse(0);
|
||||
|
|
Loading…
Reference in a new issue