Switched getInputInventory() to availableItems

- Using availableItems instead of getInputInventory() in case an item in the output inventory is being used as an ingredient
- Removed commented code
This commit is contained in:
caelwarner 2022-09-30 15:39:19 -07:00
parent 7f6cf4b4a2
commit b03aaef5a2
Failed to generate hash of commit

View file

@ -106,8 +106,6 @@ public class BasinRecipe extends ProcessingRecipe<SmartInventory> {
continue Ingredients; continue Ingredients;
if (!simulate) if (!simulate)
availableItems.extractItem(slot, 1, false); availableItems.extractItem(slot, 1, false);
// else if (extracted.hasContainerItem())
// recipeOutputItems.add(extracted.getContainerItem().copy());
extractedItemsFromSlot[slot]++; extractedItemsFromSlot[slot]++;
continue Ingredients; continue Ingredients;
} }
@ -159,7 +157,7 @@ public class BasinRecipe extends ProcessingRecipe<SmartInventory> {
recipeOutputItems.add(recipe.getResultItem()); recipeOutputItems.add(recipe.getResultItem());
if (recipe instanceof CraftingRecipe craftingRecipe) { if (recipe instanceof CraftingRecipe craftingRecipe) {
recipeOutputItems.addAll(craftingRecipe.getRemainingItems(new DummyCraftingContainer(basin.getInputInventory(), extractedItemsFromSlot))); recipeOutputItems.addAll(craftingRecipe.getRemainingItems(new DummyCraftingContainer(availableItems, extractedItemsFromSlot)));
} }
} }
} }