SHARE
TWEET

CC Farmer

Protowalker Jun 6th, 2020 1,335 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. os.loadAPI("apis/tortoise.lua")
  2.  
  3.  
  4. local plantTypes = {}
  5. plantTypes["minecraft:wheat"] = 7
  6. plantTypes["minecraft:carrots"] = 7
  7. plantTypes["minecraft:beetroots"] = 3
  8.  
  9. local prog = 0
  10. while true do
  11.     while not turtle.detect() do
  12.         local success,data = turtle.inspectDown()
  13.         if turtle.getItemCount(2) == 1 then tortoise.consolidateItems(2) end
  14.         if not success then
  15.             turtle.select(2)
  16.             turtle.placeDown()
  17.         else
  18.             if data.state.age == plantTypes[data.name] then
  19.                 turtle.select(3)
  20.                 turtle.digDown()
  21.                 turtle.select(2)
  22.                 turtle.placeDown()
  23.             end
  24.             turtle.select(3)
  25.             turtle.placeDown()
  26.         end
  27.             tortoise.moveForward()
  28.     end
  29.     if prog%2==0 then tortoise.turnRight()
  30.     else tortoise.turnLeft() end
  31.     if turtle.detect() then break end
  32.     tortoise.moveForward()
  33.     if prog%2==0 then tortoise.turnRight()
  34.     else tortoise.turnLeft() end
  35.    
  36.     local success,data = turtle.inspectUp()
  37.     if success and data.name == "minecraft:chest" then
  38.         tortoise.consolidateItems(2)
  39.         for i=4,16 do
  40.             turtle.dropUp(turtle.getItemCount(i))
  41.         end
  42.     end
  43.  
  44.     prog = prog + 1
  45. end
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
Top