Don't take ghost slots into account when looking for present items (#136)

Fixes always-present items in forestry worktables
This commit is contained in:
Jakub Szewczyk authored and GitHub committed 2021-06-14 17:14:06 -07:00
1 parent ae2cc2c600
commit 475fda6ceb
1 file changed
+1 -1
+1 -1
View File
@@ -394,7 +394,7 @@ public abstract class GuiRecipe extends GuiContainer implements IGuiContainerOve
itemPresenceCacheSlots.clear();
List<PositionedStack> ingredients = handler.getIngredientStacks(recipe);
ArrayList<ItemStack> invStacks = ((List<Slot>) firstGui.inventorySlots.inventorySlots).stream()
.filter(s -> s != null && s.getStack() != null && s.getStack().stackSize > 0 && s.isItemValid(s.getStack()))
.filter(s -> s != null && s.getStack() != null && s.getStack().stackSize > 0 && s.isItemValid(s.getStack()) && s.canTakeStack(mc.thePlayer))
.map(s -> s.getStack().copy())
.collect(Collectors.toCollection(ArrayList::new));
for (PositionedStack stack : ingredients) {