This is a read-only snapshot of the ComputerCraft forums, taken in April 2020.
Noodle's profile picture

Turtle Farmer

Started by Noodle, 08 March 2012 - 03:29 AM
Noodle #1
Posted 08 March 2012 - 04:29 AM
Have made the first turtle farmer.



-- Coded by Noodle
-- Any suggestions? PM Me.
term.clear()
term.setCursorPos(1,1)

function getItem()
turtle.turnRight()
if turtle.detect() == false then
turtle.turnLeft()
turtle.turnLeft()
end
end

print "Farming..."
while turtle.detect() == true do
turtle.forward()
turtle.dig()
turtle.forward()
if turtle.detect() == false then
turtle.forward()
if turtle.detect() == false then
turtle.back()
getItem()
if turtle.detect() == false then
turtle.forward()
end
end
end
end

Known problems
———————–
1.Doesn't do dynamic farms
2. Only can cross water ways that are 1 block (e.g. (plus is water) -+- you can do -++- you can't do
Noodle #2
Posted 09 March 2012 - 03:55 AM
Updating, making sure getItem() is both right and left.
Noodle #3
Posted 09 March 2012 - 04:00 AM
Done! Next is more loops and a full 360 degree turn to search for wheat.
TheDeathOfRandom #4
Posted 09 March 2012 - 05:49 AM
I like this… I'll see how I can tweak it to my preferences.

Props
TheDeathOfRandom
ficolas #5
Posted 09 March 2012 - 06:58 PM
U arent the first
Noodle #6
Posted 09 March 2012 - 09:31 PM
No other records of the farmer, besides, this is the only one posted. I assume its easier to get programs than to make them.