Skip to content

Commit

Permalink
Fixed exception
Browse files Browse the repository at this point in the history
  • Loading branch information
AverageGithub committed Oct 13, 2023
1 parent cd0d054 commit 68b2282
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 @@ -183,8 +183,8 @@ private boolean checkRecipe(Inventory inventory, ItemStack finalBase, ItemStack

if (recipe instanceof SmithingRecipe smithingRecipe) {
boolean test1 = smithingRecipe.getBase().test(finalBase);
if (!finalBase.hasItemMeta()) return false;
ItemMeta baseItemMeta = finalBase.getItemMeta();
if (baseItemMeta == null) return false;
boolean test2 = smithingRecipe.getAddition().test(finalAddition);

if (dontConvertWithModelData && baseItemMeta.hasCustomModelData()) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -258,8 +258,8 @@ private boolean checkRecipe(Inventory inventory, ItemStack finalTemplate, ItemSt
if (recipe instanceof SmithingTransformRecipe transformRecipe) {
boolean test1 = transformRecipe.getTemplate().test(finalTemplate);
boolean test2 = transformRecipe.getBase().test(finalBase);
if (!finalBase.hasItemMeta()) return false;
ItemMeta baseItemMeta = finalBase.getItemMeta();
if (baseItemMeta == null) return false;
boolean test3 = transformRecipe.getAddition().test(finalAddition);

if (dontConvertWithModelData && baseItemMeta.hasCustomModelData()) {
Expand Down

0 comments on commit 68b2282

Please sign in to comment.