Skip to content

Commit

Permalink
fix: check for contract violating null item stacks as recipe results
Browse files Browse the repository at this point in the history
Closes #71
  • Loading branch information
klikli-dev committed Feb 1, 2023
1 parent 2af9ed1 commit e3edcac
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ public static void registerCreativeModeTabs(AlchemicalSulfurItem item, CreativeM
if (level != null) {
var recipeManager = level.getRecipeManager();
recipeManager.getRecipes().forEach((recipe) -> {
if (recipe.getResultItem().getItem() == item) {
if (recipe.getResultItem() != null && recipe.getResultItem().getItem() == item) {
output.accept(recipe.getResultItem().copy());
}
});
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -446,7 +446,7 @@ public static void registerCreativeModeTabs(DivinationRodItem item, CreativeMode
if (level != null) {
var recipeManager = level.getRecipeManager();
recipeManager.getRecipes().forEach((recipe) -> {
if (recipe.getResultItem().getItem() == item) {
if (recipe.getResultItem() != null && recipe.getResultItem().getItem() == item) {
output.accept(recipe.getResultItem().copy());
}
});
Expand Down

0 comments on commit e3edcac

Please sign in to comment.