SHOW:
|
|
- or go back to the newest paste.
| 1 | --[[ | |
| 2 | Using: CC: Tweaked, Plethora | |
| 3 | - | pastebin run 1k4ECcCv |
| 3 | + | pastebin run Fa8bHCut |
| 4 | - | pastebin get 1k4ECcCv startup |
| 4 | + | pastebin get Fa8bHCut startup |
| 5 | ]]-- | |
| 6 | ||
| 7 | if pcall(os.loadAPI, "jLib/jFuncs") then | |
| 8 | else | |
| 9 | shell.run("pastebin get kqBFGcfV jLib/jFuncs")
| |
| 10 | os.loadAPI("jLib/jFuncs")
| |
| 11 | end | |
| 12 | ||
| 13 | - | local craftingCore = peripheral.find("actuallyadditions:phantomface")
|
| 13 | + | local input = peripheral.find("appliedenergistics2:interface")
|
| 14 | - | local input1 = peripheral.wrap("minecraft:ender chest_4")
|
| 14 | + | --local output = peripheral.find("minecraft:ironchest_diamond")
|
| 15 | - | local input2 = peripheral.wrap("minecraft:ender chest_5")
|
| 15 | + | local output = peripheral.find("danknull:danknull_dock")
|
| 16 | - | local output = peripheral.wrap("minecraft:ender chest_6")
|
| 16 | + | |
| 17 | local countLimit = 10000 | |
| 18 | ||
| 19 | - | local function moveAllCobble() |
| 19 | + | local function getAllOutput() |
| 20 | - | for i, item in pairs(input1.list()) do |
| 20 | + | local meta |
| 21 | - | if(item.name == "minecraft:cobblestone") then |
| 21 | + | local ret = {}
|
| 22 | - | input1.pushItems(peripheral.getName(output), i) |
| 22 | + | output = peripheral.find("danknull:danknull_dock")
|
| 23 | if(not output.list) then | |
| 24 | return nil | |
| 25 | - | for i, item in pairs(input2.list()) do |
| 25 | + | |
| 26 | - | if(item.name == "minecraft:cobblestone") then |
| 26 | + | for i, item in pairs(output.list()) do |
| 27 | - | input2.pushItems(peripheral.getName(output), i) |
| 27 | + | if(item.count < countLimit) then |
| 28 | ret[i] = item | |
| 29 | end | |
| 30 | end | |
| 31 | return ret | |
| 32 | end | |
| 33 | - | if(craftingCore.getItem(2)) then |
| 33 | + | |
| 34 | - | moveAllCobble() |
| 34 | + | local function getItems(toMove) |
| 35 | - | craftingCore.pushItems(peripheral.getName(output), 2) |
| 35 | + | local inputMeta |
| 36 | for i, inputItem in pairs(input.list()) do | |
| 37 | - | os.sleep(1) |
| 37 | + | for _, itemToMove in pairs(toMove) do |
| 38 | if(jFuncs.itemsEqual(itemToMove, inputItem)) then | |
| 39 | output = peripheral.find("danknull:danknull_dock")
| |
| 40 | if(output.pullItems) then | |
| 41 | output.pullItems(peripheral.getName(input), i) | |
| 42 | else | |
| 43 | return false | |
| 44 | end | |
| 45 | end | |
| 46 | end | |
| 47 | end | |
| 48 | return true | |
| 49 | end | |
| 50 | ||
| 51 | local toMove | |
| 52 | while(true) do | |
| 53 | toMove = getAllOutput() | |
| 54 | if(toMove) then | |
| 55 | if(not getItems(toMove)) then | |
| 56 | os.sleep(1) | |
| 57 | end | |
| 58 | else | |
| 59 | os.sleep(1) | |
| 60 | end | |
| 61 | end | |
| 62 |