name_fluiditems = { [""] = true, -- "Large Aluminium Fluid Cell" [""] = true, -- "Large Steel Fluid Cell" [""] = true, -- "Volumetric flask" [""] = true, -- "Large Volumetric Flask" [""] = true -- "Gigantic Volumetric Flask" } name_circuit = "" name_chest = "tile.chest" name_babychest = "tile.babyChest" name_ironchest = "tile.IronChest" -- can be bronze/obsidian chest too, same name name_input = "gt.blockmachines" -- the input bus of the gregtech multiblock t = require("component").transposer -- there should be only one sides = require("sides") idle = true -- means we assume there is no current work for the EBF function findSides() for i = 0, 5, 1 do if t.getInventoryName(i) == name_chest then side_fluid = i elseif t.getInventoryName(i) == name_babychest then side_output = i elseif t.getInventoryName(i) == name_ironchest then side_input = i elseif t.getInventoryName(i) == name_input then side_ebf = i end end if side_fluid == nil then error("Error: Need a regular chest next to the transposer to put fluid items.") end if side_output == nil then error("Error: Need a baby chest next to the transposer to put output items.") end if side_input == nil then error("Error: Need a iron chest next to the transposer to put input items (from a AE2 interface).") end if side_ebf == nil then error("Error: Need a Gregtech Multiblock next to the transposer to put items.") end stacks = t.getInventorySize(side_ebf) end findSides() while true do local input if idle then -- push fluid and items into ebf input = t.getStackInSlot(side_input, 1) if input ~= nil then -- we got input in the input chest (from AE2 interface) if input.label ~= name_circuit then error("Error: First item in input chest slot needs to be a programmed circuit.") end idle = false print("new cooking job") -- split fluid/items into appropiate EBF blocks for i = 1, stacks, 1 do input = t.getStackInSlot(side_input, i) if input == nil then break end -- nothing more to move if name_fluiditems[input.label] ~= nil then t.transferItem(side_input, side_fluid, 64, i, i) else t.transferItem(side_input, side_ebf, 64, i, i) end end end else -- wait for ebf to finish input = t.getStackInSlot(side_ebf, 2) if input == nil then -- finished, move circuit back to output t.transferItem(side_ebf, side_output, 64, 1, 1) idle = true print("finished") end end os.sleep(2) end