Skip to content

Commit

Permalink
Fix accidentally disabling recipe transfer entirely in EMI (#7765)
Browse files Browse the repository at this point in the history
  • Loading branch information
shartte authored Mar 14, 2024
1 parent 9c23035 commit ea80405
Showing 1 changed file with 8 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,14 @@ public List<Slot> getCraftingSlots(T menu) {
return null;
}

@Override
public boolean canCraft(EmiRecipe recipe, EmiCraftContext<T> context) {
if (context.getType() == EmiCraftContext.Type.FILL_BUTTON) {
return transferRecipe(recipe, context, false).canCraft();
}
return StandardRecipeHandler.super.canCraft(recipe, context);
}

protected abstract Result transferRecipe(T menu,
@Nullable RecipeHolder<?> holder,
EmiRecipe emiRecipe,
Expand Down

0 comments on commit ea80405

Please sign in to comment.