diff --git a/src/main/java/codechicken/nei/ItemCraftablesPanel.java b/src/main/java/codechicken/nei/ItemCraftablesPanel.java index 78b9dc61..4b5d38b7 100644 --- a/src/main/java/codechicken/nei/ItemCraftablesPanel.java +++ b/src/main/java/codechicken/nei/ItemCraftablesPanel.java @@ -35,12 +35,15 @@ public class ItemCraftablesPanel protected final long realAmount; protected final boolean isFluidDisplay; protected final RecipeId recipeId; + protected final ItemStack drawnItemStack; public CraftablesGridSlot(int slotIndex, int itemIndex, ItemStack itemStack, RecipeId recipeId) { super(slotIndex, itemIndex, itemStack); this.realAmount = StackInfo.getAmount(itemStack); this.isFluidDisplay = StackInfo.isFluidDisplayItem(itemStack); this.recipeId = recipeId; + final ItemStack empty = this.isFluidDisplay ? StackInfo.withAmount(itemStack, 0) : null; + this.drawnItemStack = empty != null ? empty : itemStack; } @Override @@ -48,6 +51,11 @@ public class ItemCraftablesPanel return this.recipeId; } + @Override + public void drawItem(Rectangle4i rect) { + super.drawItem(this.drawnItemStack, rect); + } + @Override public void afterDraw(Rectangle4i rect, M mouseContext) { drawStackSize(rect);