Added fluid support in recipes (#1020)

This commit is contained in:
slprime authored and GitHub committed 2026-09-08 13:41:16 +03:00
1 parent 3f38e6f39b
commit fda7688807
31 files changed
+831 -127

No files matched your search

@@ -24,7 +24,7 @@ import codechicken.lib.gui.GuiDraw;
import codechicken.lib.vec.Rectangle4i;
import codechicken.nei.BookmarkPanel.BookmarkViewMode;
import codechicken.nei.ItemPanels;
import codechicken.nei.ItemStackSet;
import codechicken.nei.ItemStackAmount;
import codechicken.nei.ItemsGrid;
import codechicken.nei.ItemsGrid.MouseContext;
import codechicken.nei.LayoutManager;
@@ -913,8 +913,8 @@ public class BookmarkGrid extends ItemsGrid<BookmarksGridSlot, BookmarkGrid.Book
}
public void addRecipe(Recipe recipe, int multiplier, int groupId) {
final ItemStackSet seenResults = new ItemStackSet();
final ItemStackSet seenIngredients = new ItemStackSet();
final ItemStackAmount seenResults = new ItemStackAmount();
final ItemStackAmount seenIngredients = new ItemStackAmount();
final List<ItemStack> results = new ArrayList<>();
final List<ItemStack> ingredients = new ArrayList<>();
@@ -42,7 +42,7 @@ public class BookmarkItem {
this.groupId = groupId;
this.stack = stack;
this.factor = nbTag.hasKey("gtFluidName") ? Math.min(144, nbTag.getInteger("Count")) : 1;
this.factor = StackInfo.isFluidDisplayItem(stack) ? Math.min(144, nbTag.getInteger("Count")) : 1;
}
public Builder factor(long factor) {
@@ -82,7 +82,7 @@ public class BookmarksGridSlot extends ItemsGridSlot {
this.bookmarkItem = bookmarkItem;
this.isOutputRecipe = group.crafting != null && group.crafting.outputRecipes.contains(bookmarkItem.recipeId);
this.isFluidDisplay = StackInfo.itemStackToNBT(bookmarkItem.itemStack).hasKey("gtFluidName");
this.isFluidDisplay = StackInfo.isFluidDisplayItem(bookmarkItem.itemStack);
this.realMultiplier = realMultiplier;
this.calculatedMultiplier = calculatedMultiplier;