mirror of
https://github.com/Ellpeck/ActuallyAdditions.git
synced 2024-12-22 11:29:23 +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,9 +218,11 @@ public class TileEntityLaserRelayEnergy extends TileEntityLaserRelay {
|
|||
if (deduct >= theoreticalReceived) { //Happens with small numbers
|
||||
deduct = 0;
|
||||
}
|
||||
|
||||
trans += cap.receiveEnergy(theoreticalReceived - deduct, simulate);
|
||||
trans += deduct;
|
||||
int actual = cap.receiveEnergy(theoreticalReceived - deduct, simulate);
|
||||
if (actual > 0) {
|
||||
trans += actual;
|
||||
trans += deduct;
|
||||
}
|
||||
}
|
||||
|
||||
return trans;
|
||||
|
|
Loading…
Reference in a new issue