Skip to content

Commit

Permalink
small fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
ghzdude committed Jun 9, 2024
1 parent 7157450 commit c55fb25
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -226,7 +226,7 @@ public ItemStack findSubstitute(int craftingIndex, ItemStack stack) {
// iterate stored items to find equivalent
for (int i = 0; i < this.availableHandlers.getSlots(); i++) {
var itemStack = availableHandlers.getStackInSlot(i);
if (itemStack.isEmpty()) continue;
if (itemStack.isEmpty() || this.strategy.equals(itemStack, stack)) continue;

var recipe = getCachedRecipe();

Expand Down Expand Up @@ -268,6 +268,7 @@ public ItemStack findSubstitute(int craftingIndex, ItemStack stack) {
ItemStack.areItemStacksEqual(newResult, previousResult)) ||
recipe instanceof ShapedOreEnergyTransferRecipe) {
// ingredient matched, return the substitute
craftingMatrix.setInventorySlotContents(craftingIndex, stack);
map.put(itemStack.copy(), true);
substitute = itemStack;
break;
Expand Down

0 comments on commit c55fb25

Please sign in to comment.