Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- --[[
- Using: CC: Tweaked, Plethora
- pastebin run Fa8bHCut
- pastebin get Fa8bHCut startup
- ]]--
- if pcall(os.loadAPI, "jLib/jFuncs") then
- else
- shell.run("pastebin get kqBFGcfV jLib/jFuncs")
- os.loadAPI("jLib/jFuncs")
- end
- local input = peripheral.find("appliedenergistics2:interface")
- --local output = peripheral.find("minecraft:ironchest_diamond")
- local output = peripheral.find("danknull:danknull_dock")
- local countLimit = 10000
- local function getAllOutput()
- local meta
- local ret = {}
- output = peripheral.find("danknull:danknull_dock")
- if(not output.list) then
- return nil
- end
- for i, item in pairs(output.list()) do
- if(item.count < countLimit) then
- ret[i] = item
- end
- end
- return ret
- end
- local function getItems(toMove)
- local inputMeta
- for i, inputItem in pairs(input.list()) do
- for _, itemToMove in pairs(toMove) do
- if(jFuncs.itemsEqual(itemToMove, inputItem)) then
- output = peripheral.find("danknull:danknull_dock")
- if(output.pullItems) then
- output.pullItems(peripheral.getName(input), i)
- else
- return false
- end
- end
- end
- end
- return true
- end
- local toMove
- while(true) do
- toMove = getAllOutput()
- if(toMove) then
- if(not getItems(toMove)) then
- os.sleep(1)
- end
- else
- os.sleep(1)
- end
- end
Add Comment
Please, Sign In to add comment