Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local direction = "up"
- local emptyflag = 0
- local function suck()
- if direction == "up" then
- turtle.suckDown(1)
- else
- turtle.suckUp(1)
- end
- end
- local function move_items(pos1,pos2)
- turtle.select(pos1)
- turtle.transferTo(pos2)
- end
- local function drop(side)
- turtle.select(1)
- if side == "up" then
- turtle.dropUp()
- elseif side == "down" then
- turtle.dropDown()
- else
- for i=1,16 do
- if i~=6 then
- turtle.select(i)
- turtle.drop()
- end
- end
- end
- end
- local function fillCraft()
- turtle.select(2)
- suck()
- turtle.select(5)
- suck()
- turtle.select(7)
- suck()
- turtle.select(10)
- suck()
- end
- -- Main Code
- turtle.select(1)
- turtle.turnLeft()
- turtle.turnLeft()
- while turtle.suck() == true do
- turtle.dropDown()
- end
- turtle.turnLeft()
- turtle.turnLeft()
- while true do
- fillCraft()
- turtle.select(1)
- if turtle.craft(1) == false then
- drop("forward")
- emptyflag = emptyflag + 1
- if direction == "up" then
- direction = "down"
- else
- direction = "up"
- end
- else
- emptyflag = 0
- drop(direction)
- end
- if emptyflag > 2 then
- break
- end
- end
Add Comment
Please, Sign In to add comment