Skip to content

Commit

Permalink
[1.9.4]添加一个检查
Browse files Browse the repository at this point in the history
  • Loading branch information
YufiriaMazenta committed Jun 6, 2024
1 parent 2df329d commit fa2ddde
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,9 @@ public void refreshResult(PrepareItemCraftEvent event) {
return;
}
ItemStack refreshItem = ItemManager.INSTANCE.matchItem(id);
if (item.isSimilar(refreshItem)) {
return;
}
item.setItemMeta(refreshItem.getItemMeta());
event.getInventory().setResult(item);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,9 @@ public void refreshResult(PrepareSmithingEvent event) {
return;
}
ItemStack refreshItem = ItemManager.INSTANCE.matchItem(id);
if (item.isSimilar(refreshItem)) {
return;
}
item.setItemMeta(refreshItem.getItemMeta());
event.setResult(item);
event.getInventory().setResult(item);
Expand Down

0 comments on commit fa2ddde

Please sign in to comment.