Add a way to compare NBT leniently (#209)

* Fix itemstack comparator not handling NBT leniently
* add util function to PositionedStack
This commit is contained in:
miozune authored and GitHub committed 2022-02-07 12:12:26 -08:00
1 parent 3291dab52d
commit 6609911d96
4 files changed
+101 -2

No files matched your search

@@ -98,6 +98,14 @@ public class PositionedStack
return false;
}
public boolean containsWithNBT(ItemStack ingredient) {
for(ItemStack item : items)
if(NEIServerUtils.areStacksSameTypeCraftingWithNBT(item, ingredient))
return true;
return false;
}
public boolean contains(Item ingred) {
for(ItemStack item : items)
if(item.getItem() == ingred)