package org.cyclops.cyclopscore.recipe.type;

import net.minecraft.world.entity.player.Player;
import net.minecraft.world.inventory.CraftingContainer;
import net.minecraft.world.inventory.AbstractContainerMenu;
import net.minecraft.world.item.ItemStack;
import net.minecraft.core.NonNullList;
import net.minecraftforge.fluids.FluidStack;
import net.minecraftforge.fluids.capability.IFluidHandler;

/**
 * Default implementation of {@link IInventoryFluid}.
 * @author rubensworks
 */
public class InventoryFluid extends CraftingContainer implements IInventoryFluid {

    private final IFluidHandler fluidHandler;

    public InventoryFluid(NonNullList<ItemStack> itemStacks, NonNullList<FluidStack> fluidStacks) {
        super(new AbstractContainerMenu(null, 0) {
            @Override
            public boolean stillValid(Player playerIn) {
                return false;
            }
        }, itemStacks.size(), 1);
        int slot = 0;
        for (ItemStack itemStack : itemStacks) {
            setItem(slot++, itemStack);
        }
        this.fluidHandler = new FluidHandlerListReadOnly(fluidStacks);
    }

    @Override
    public IFluidHandler getFluidHandler() {
        return this.fluidHandler;
    }
}

@@ -39,16 +39,55 @@
 .type;%0A%0A
+import net.minecraft.core.NonNullList;%0A
 import n
@@ -164,24 +164,24 @@
 ventory.
-Crafting
+Abstract
 Containe
@@ -181,16 +181,20 @@
 ontainer
+Menu
 ;%0Aimport
@@ -220,32 +220,32 @@
 d.inventory.
-Abstract
+Crafting
 ContainerMen
@@ -233,36 +233,32 @@
 raftingContainer
-Menu
 ;%0Aimport net.min
@@ -290,47 +290,8 @@
 ck;%0A
-import net.minecraft.core.NonNullList;%0A
 impo
@@ -389,16 +389,81 @@
 Handler;
+%0Aimport net.minecraftforge.fluids.capability.templates.FluidTank;
 %0A%0A/**%0A *
@@ -1093,32 +1093,249 @@
 ack);%0A        %7D%0A
+        if (fluidStacks.size() == 1) %7B%0A            this.fluidHandler = new FluidTank(Integer.MAX_VALUE);%0A            this.fluidHandler.fill(fluidStacks.get(0), IFluidHandler.FluidAction.EXECUTE);%0A        %7D else %7B%0A    
         this.flu
@@ -1389,16 +1389,26 @@
 tacks);%0A
+        %7D%0A
     %7D%0A%0A 

Fix crash when simulating drying basin craft in ID