Skip to content

Commit 7638e35

Browse files
committed
fix: always perform conversion checks
1 parent 00495f1 commit 7638e35

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/main/java/mekanism/common/integration/energy/forgeenergy/ForgeStrictEnergyHandler.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ public long insertEnergy(long amount, Action action) {
6464
if (toInsert == 0) {
6565
return amount;
6666
}
67-
if (action.execute() && !converter.isOneToOne()) {
67+
if (!converter.isOneToOne()) {
6868
//Before we can actually execute it we need to simulate to calculate how much we can actually insert
6969
long simulatedInserted = storage.receiveEnergy(toInsert, true);
7070
if (simulatedInserted == 0) {
@@ -112,7 +112,7 @@ public long extractEnergy(long amount, Action action) {
112112
if (toExtract == 0) {
113113
return 0;
114114
}
115-
if (action.execute() && !converter.isOneToOne()) {
115+
if (!converter.isOneToOne()) {
116116
//Before we can actually execute it we need to simulate to calculate how much we can actually extract in our other units
117117
long simulatedExtracted = storage.extractEnergy(toExtract, true);
118118
//Convert how much we could extract back to Joules so that it gets appropriately clamped so that for example 1 Joule gets treated

0 commit comments

Comments
 (0)