Skip to content

Commit

Permalink
Always use ItemDataService, as we can't do the instanceof check
Browse files Browse the repository at this point in the history
  • Loading branch information
Intybyte committed Nov 4, 2024
1 parent b646376 commit 330fd31
Showing 1 changed file with 0 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -1210,14 +1210,8 @@ public final int hashCode() {
return null;
}

if (item instanceof SlimefunItemStack stack) {
return getById(stack.getItemId());
}

Optional<String> itemID = Slimefun.getItemDataService().getItemData(item);

return itemID.map(SlimefunItem::getById).orElse(null);

}

/**
Expand Down

0 comments on commit 330fd31

Please sign in to comment.