Skip to content

Commit

Permalink
Only calculate energy expenditure for items when modulating EMC stora…
Browse files Browse the repository at this point in the history
…ge contents
  • Loading branch information
62832 committed Apr 30, 2024
1 parent 49c7abc commit 4164f51
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/main/java/gripe/_90/appliede/service/EMCStorage.java
Original file line number Diff line number Diff line change
Expand Up @@ -150,10 +150,10 @@ public long extractItem(AEItemKey what, long amount, Actionable mode, IActionSou
break;
}

var energyToExpend = source.player().isPresent() ? 0 : PowerMultiplier.CONFIG.multiply(toWithdraw);
var availablePower = energy.extractAEPower(energyToExpend, Actionable.SIMULATE, PowerMultiplier.CONFIG);

if (mode == Actionable.MODULATE) {
var energyToExpend = source.player().isPresent() ? 0 : PowerMultiplier.CONFIG.multiply(toWithdraw);
var availablePower = energy.extractAEPower(energyToExpend, Actionable.SIMULATE, PowerMultiplier.CONFIG);

if (availablePower < energyToExpend) {
break;
}
Expand Down

0 comments on commit 4164f51

Please sign in to comment.