View difference between Paste ID: AcugavZ3 and FdySjxg4
SHOW: | | - or go back to the newest paste.
1
function Absorb(slot, upDown)
2
    turtle.select(slot)
3
    local count = turtle.getItemCount(slot)
4
    while count < 1 do
5
        if upDown then
6
            turtle.suckUp(1)
7
        else
8
            turtle.suckDown(1)
9
        end
10
        count = turtle.getItemCount(slot)
11
    end
12
end
13
14
--Sanitize
15
for i=1,16,1 do
16
    local data = turtle.getItemDetail(i)
17
    if data then
18
        if data.name == "ic2:glass" then
19
            while turtle.getItemCount(i) > 0 do
20
                turtle.drop()
21
            end
22
        end
23
    end
24
end
25
26
27
local up = true
28
local down = false
29
30
while true do
31
    Absorb(1, down)
32
    Absorb(2, down)
33
    Absorb(3, down)    
34
    Absorb(5, up)
35
    Absorb(6, down)
36
    Absorb(7, up)
37
    Absorb(9, down)
38
    Absorb(10, down)
39
    Absorb(11, down)
40
    turtle.craft()
41
    for i=1,16,1 do
42
        while turtle.getItemCount(i) > 0 do
43
            turtle.select(i)
44
            turtle.drop()
45
        end
46
    end
47
end