Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- os.loadAPI("functions")
- os.loadAPI("typeGen")
- local SLOT_COUNT = 16
- STICKS = {"minecraft:stick"}
- orientation = 0
- directions = {
- }
- function turnTo(to, from)
- if to == from then
- return to
- elseif to < from then
- turtle.turnLeft()
- return turnTo(to, from-1)
- else
- turtle.turnRight()
- return turnTo(to, from+1)
- end
- end
- while true do
- for i = 1, SLOT_COUNT, 1 do
- data = turtle.getItemDetail(i)
- if data then
- turtle.select(i)
- if functions.inTable(typeGen.SAPLINGS, data.name) then
- orientation = turnTo(0, orientation)
- if not turtle.drop() then
- orientation = turtle.turnTo(-1, orientation)
- turtle.drop()
- end
- elseif functions.inTable(typeGen.ALL_LOGS, data.name) then
- turtle.dropDown()
- else
- orientation = turnTo(-1, orientation)
- turtle.drop()
- end
- end
- end
- turtle.select(1)
- while not redstone.getInput("top") do
- sleep(4)
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement