Fix NullPointer Crash with Carpentry Search bench and BLANK recipes

This commit is contained in:
Kam committed 2023-05-11 11:19:36 -04:00
1 parent 0c07260999
commit 1183f7d91b
1 file changed
+6 -1
@@ -72,7 +72,12 @@ public class GuiRecipes extends GuiNPCInterface
}
List<IRecipe> list = new ArrayList<IRecipe>();
for(IRecipe recipe : RecipeController.instance.anvilRecipes.values()){
// System.out.println(recipe.getRecipeOutput().getDisplayName());
if(recipe.getRecipeOutput() == null)
continue;
if(recipe.getRecipeOutput().getDisplayName() == null)
continue;
if(recipe.getRecipeOutput().getDisplayName().toLowerCase().contains(search.toLowerCase()))
list.add(recipe);
}