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 b2d06a7 commit 5ffd566
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 @@ -103,7 +103,7 @@ public static void fillItemCategory(AlchemicalSulfurItem item, CreativeModeTab t
if (level != null) {
var recipeManager = level.getRecipeManager();
recipeManager.getRecipes().forEach((recipe) -> {
if (recipe.getResultItem().getItem() == item) {
if (recipe.getResultItem() != null && recipe.getResultItem().getItem() == item) {
items.add(recipe.getResultItem().copy());
}
});
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -460,7 +460,7 @@ public static void fillItemCategory(DivinationRodItem item, CreativeModeTab tab,
if (level != null) {
var recipeManager = level.getRecipeManager();
recipeManager.getRecipes().forEach((recipe) -> {
if (recipe.getResultItem().getItem() == item) {
if (recipe.getResultItem() != null && recipe.getResultItem().getItem() == item) {
items.add(recipe.getResultItem().copy());
}
});
Expand Down

0 comments on commit 5ffd566

Please sign in to comment.