Skip to content

Commit

Permalink
Fix 2x2 Integrated Crafting recipes from Machine Reader failing
Browse files Browse the repository at this point in the history
  • Loading branch information
rubensworks committed Dec 27, 2023
1 parent e581c85 commit bd3a929
Showing 1 changed file with 4 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,10 @@ public boolean craft(Function<IngredientComponent<?, ?>, PartPos> targetGetter,
CraftingGrid grid = new CraftingGrid(ingredients, 3, 3);

return CraftingHelpers.findServerRecipe(RecipeType.CRAFTING, grid, target.getPos().getLevel(true))
.or(() -> {
CraftingGrid gridSmall = new CraftingGrid(ingredients, 2, 2);
return CraftingHelpers.findServerRecipe(RecipeType.CRAFTING, gridSmall, target.getPos().getLevel(true));
})
.map(recipe -> {
ItemStack result = recipe.assemble(grid);

Expand Down

0 comments on commit bd3a929

Please sign in to comment.