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
No known key found for this signature in database
GPG key ID: 514BEF5EADE889FF

View file

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