Skip to content

Commit

Permalink
Fix cables sending too much energy, leading to crashes (#89)
Browse files Browse the repository at this point in the history
  • Loading branch information
Technici4n committed May 6, 2023
1 parent ea9d233 commit f2823fc
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ public long insert(long maxReceive, TransactionContext transaction, @Nullable Di
if (amount <= 0)
break;
if (!cable.energySides.isEmpty() && cable.isActive()) {
received += ((FabricCableTile) cable).pushEnergy(maxReceive, transaction, direction, this);
received += ((FabricCableTile) cable).pushEnergy(amount, transaction, direction, this);
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ public long receiveEnergy(long maxReceive, boolean simulate, @Nullable Direction
if (amount <= 0)
break;
if (!cable.energySides.isEmpty() && cable.isActive()) {
received += ((ForgeCableTile) cable).pushEnergy(maxReceive, simulate, direction, this);
received += ((ForgeCableTile) cable).pushEnergy(amount, simulate, direction, this);
}
}

Expand Down

0 comments on commit f2823fc

Please sign in to comment.