Skip to content

Commit

Permalink
Fix explicit requests for recipes (#10310)
Browse files Browse the repository at this point in the history
Fix output-conditional recipe search (broken by 4f972e8); notably fixes nether miner not asking for resources.
  • Loading branch information
uecasm authored Oct 5, 2024
1 parent b0b29a4 commit 7066c5c
Showing 1 changed file with 6 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -653,9 +653,13 @@ public IRecipeStorage getFirstRecipe(final Predicate<ItemStack> stackPredicate)
continue;
}
final IRecipeStorage storage = IColonyManager.getInstance().getRecipeManager().getRecipes().get(token);
if (storage != null && (stackPredicate.test(storage.getPrimaryOutput()) || InventoryUtils.getFirstMatch(storage.getAlternateOutputs(), stackPredicate) != null)
&& storage.getClassicForMultiOutput(stackPredicate) != null)
if (storage != null && (stackPredicate.test(storage.getPrimaryOutput()) || InventoryUtils.getFirstMatch(storage.getAlternateOutputs(), stackPredicate) != null))
{
if (storage.getRecipeType() instanceof MultiOutputRecipe && storage.getClassicForMultiOutput(stackPredicate) == null)
{
continue;
}

if(foundRecipe == null)
{
foundRecipe = storage;
Expand Down

0 comments on commit 7066c5c

Please sign in to comment.