Skip to content

Commit

Permalink
Update LimitedUseItem.java
Browse files Browse the repository at this point in the history
  • Loading branch information
mcchampions committed Jul 28, 2024
1 parent 1a7096d commit d277b24
Showing 1 changed file with 3 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -152,6 +152,9 @@ private void updateItemLore(ItemStack item, ItemMeta meta, int usesLeft) {

@Override
public boolean canStack(ItemMeta itemMetaOne, ItemMeta itemMetaTwo) {
if (Slimefun.getItemDataService().getItemData(itemMetaOne) != Slimefun.getItemDataService().getItemData(itemMetaTwo)) {
return false;
}
NamespacedKey key = getStorageKey();
PersistentDataContainer pdc1 = itemMetaOne.getPersistentDataContainer();
int usesLeft1 = pdc1.getOrDefault(key, PersistentDataType.INTEGER, getMaxUseCount());
Expand Down

0 comments on commit d277b24

Please sign in to comment.