Fix crash with null fluid stack (#193)

* fix crash with null fluid stack

* change minimum stack size in bookmarks

Co-authored-by: Serghei Borovetchi <[email protected]>
This commit is contained in:
slprimeandSerghei Borovetchi authored and GitHub committed 2022-01-07 09:06:05 -08:00
1 parent 2d18dcf42b
commit 144a37cebb
3 files changed
+20 -15

No files matched your search

@@ -281,15 +281,11 @@ public class BookmarkPanel extends ItemPanel
for (PositionedStack stack : ingredients) {
final NBTTagCompound nbTag = StackInfo.itemStackToNBT(stack.item, saveStackSize);
if (nbTag.getInteger("Count") > 0) {
if (unique.get(nbTag) == null) {
unique.put(nbTag, 1);
sorted.add(nbTag);
} else if (saveStackSize) {
unique.put(nbTag, unique.get(nbTag) + 1);
}
if (unique.get(nbTag) == null) {
unique.put(nbTag, 1);
sorted.add(nbTag);
} else if (saveStackSize) {
unique.put(nbTag, unique.get(nbTag) + 1);
}
}