Skip to content

Commit

Permalink
EffRecipeSetIngredient - prevent air being used in recipes
Browse files Browse the repository at this point in the history
- Ref #12
  • Loading branch information
ShaneBeee committed Nov 25, 2024
1 parent a94c545 commit dbb9492
Showing 1 changed file with 3 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,9 @@ private static RecipeChoice getRecipeChoice(Object ingredient) {
RecipeChoice recipeChoice = null;
if (ingredient instanceof ItemStack itemStack) {
Material material = itemStack.getType();
// Air cannot be used in recipes
if (material.isAir()) return null;

if (itemStack.isSimilar(new ItemStack(material))) {
recipeChoice = new RecipeChoice.MaterialChoice(material);
} else {
Expand Down

0 comments on commit dbb9492

Please sign in to comment.