Skip to content

Commit

Permalink
fix: Do not attempt to assemble a recipe before checking that it is s…
Browse files Browse the repository at this point in the history
…till matching.

Closes: GH-743
  • Loading branch information
Rover656 committed Sep 29, 2024
1 parent cecaf1e commit c1a4b55
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -177,7 +177,7 @@ private void processOutputBuffer() {
}

private Optional<ItemStack> getRecipeResult() {
if (recipe != null) {
if (recipe != null && recipe.value().matches(DUMMY_CRAFTING_CONTAINER.asCraftInput(), getLevel())) {
return Optional.of(recipe.value().assemble(DUMMY_CRAFTING_CONTAINER.asCraftInput(), getLevel().registryAccess()));
}
return Optional.empty();
Expand Down

0 comments on commit c1a4b55

Please sign in to comment.