Skip to content

Commit

Permalink
Fixed generators pushing a ton of power, closes InnovativeOnlineIndus…
Browse files Browse the repository at this point in the history
  • Loading branch information
Buuz135 committed Dec 19, 2020
1 parent f620efb commit a8191e2
Showing 1 changed file with 1 addition and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -97,10 +97,7 @@ public void tick() {
TileEntity checkingTile = this.world.getTileEntity(checking);
if (checkingTile != null) {
checkingTile.getCapability(CapabilityEnergy.ENERGY, facing.getOpposite()).ifPresent(storage -> {
int energy = storage.receiveEnergy(Math.min(this.getEnergyStorage().getEnergyStored(), getExtractingEnergy()), false);
if (energy > 0) {
this.getEnergyStorage().extractEnergy(energy, false);
}
this.getEnergyStorage().extractEnergy(storage.receiveEnergy(this.getEnergyStorage().extractEnergy(this.getExtractingEnergy(), true), false), false);
});
}
}
Expand Down

0 comments on commit a8191e2

Please sign in to comment.