Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function emptyYourself()
- local b = 0;
- for i = 1, 16, 1 do
- b = b + turtle.getItemCount(i)
- end
- if (b == 0) then
- return
- end
- turtle.turnLeft()
- if (turtle.detect()) then
- turtle.turnRight()
- turtle.turnRight()
- end
- local test, datatest = turtle.inspect()
- while (datatest.name ~= "minecraft:chest") do
- turtle.forward()
- test, datatest = turtle.inspect()
- end
- for i = 1, 16, 1 do
- turtle.select(i)
- turtle.drop()
- end
- turtle.turnRight()
- turtle.turnRight()
- while (turtle.detect() == false) do
- turtle.forward()
- end
- turtle.turnLeft()
- end
- while (true) do
- local success, tableshit = turtle.inspect()
- local s, downData = turtle.inspectDown()
- if (turtle.suck()) then
- turtle.suckDown()
- turtle.suckUp()
- end
- if (success) then
- turtle.turnLeft()
- turtle.turnLeft()
- end
- if (downData.name == "minecraft:planks") then
- emptyYourself()
- end
- turtle.forward()
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement