Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- os.loadAPI("apis/tortoise.lua")
- local plantTypes = {}
- plantTypes["minecraft:wheat"] = 7
- plantTypes["minecraft:carrots"] = 7
- plantTypes["minecraft:beetroots"] = 3
- local prog = 0
- while true do
- while not turtle.detect() do
- local success,data = turtle.inspectDown()
- if turtle.getItemCount(2) == 1 then tortoise.consolidateItems(2) end
- if not success then
- turtle.select(2)
- turtle.placeDown()
- else
- if data.state.age == plantTypes[data.name] then
- turtle.select(3)
- turtle.digDown()
- turtle.select(2)
- turtle.placeDown()
- end
- turtle.select(3)
- turtle.placeDown()
- end
- tortoise.moveForward()
- end
- if prog%2==0 then tortoise.turnRight()
- else tortoise.turnLeft() end
- if turtle.detect() then break end
- tortoise.moveForward()
- if prog%2==0 then tortoise.turnRight()
- else tortoise.turnLeft() end
- local success,data = turtle.inspectUp()
- if success and data.name == "minecraft:chest" then
- tortoise.consolidateItems(2)
- for i=4,16 do
- turtle.dropUp(turtle.getItemCount(i))
- end
- end
- prog = prog + 1
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement