Skip to content

Commit

Permalink
Fixed a crash that happened when inserting a pattern in the crafter
Browse files Browse the repository at this point in the history
  • Loading branch information
pedroksl committed Sep 27, 2024
1 parent 56d2d6e commit c819b53
Showing 1 changed file with 5 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -563,12 +563,11 @@ private boolean exportToMe() {
var success = false;
for (var x = 0; x < this.outputInv.size(); x++) {
var extractStack = this.outputInv.extractItem(x, MAX_OUTPUT_INV_SIZE, false);
var inserted = StorageHelper.poweredInsert(
energy,
inventory,
Objects.requireNonNull(AEItemKey.of(extractStack)),
extractStack.getCount(),
this.mySrc);

var key = AEItemKey.of(extractStack);
if (key == null) continue;

var inserted = StorageHelper.poweredInsert(energy, inventory, key, extractStack.getCount(), this.mySrc);
extractStack.setCount(extractStack.getCount() - (int) inserted);
this.outputInv.insertItem(x, extractStack, false);

Expand Down

0 comments on commit c819b53

Please sign in to comment.