Skip to content

Commit 68b2282

Browse files
committed
Fixed exception
1 parent cd0d054 commit 68b2282

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

src/main/java/com/artillexstudios/axsmithing/gui/impl/SmithingTable_V1_16.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -183,8 +183,8 @@ private boolean checkRecipe(Inventory inventory, ItemStack finalBase, ItemStack
183183

184184
if (recipe instanceof SmithingRecipe smithingRecipe) {
185185
boolean test1 = smithingRecipe.getBase().test(finalBase);
186-
if (!finalBase.hasItemMeta()) return false;
187186
ItemMeta baseItemMeta = finalBase.getItemMeta();
187+
if (baseItemMeta == null) return false;
188188
boolean test2 = smithingRecipe.getAddition().test(finalAddition);
189189

190190
if (dontConvertWithModelData && baseItemMeta.hasCustomModelData()) {

src/main/java/com/artillexstudios/axsmithing/gui/impl/SmithingTable_V1_20.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -258,8 +258,8 @@ private boolean checkRecipe(Inventory inventory, ItemStack finalTemplate, ItemSt
258258
if (recipe instanceof SmithingTransformRecipe transformRecipe) {
259259
boolean test1 = transformRecipe.getTemplate().test(finalTemplate);
260260
boolean test2 = transformRecipe.getBase().test(finalBase);
261-
if (!finalBase.hasItemMeta()) return false;
262261
ItemMeta baseItemMeta = finalBase.getItemMeta();
262+
if (baseItemMeta == null) return false;
263263
boolean test3 = transformRecipe.getAddition().test(finalAddition);
264264

265265
if (dontConvertWithModelData && baseItemMeta.hasCustomModelData()) {

0 commit comments

Comments
 (0)