Posted 17 May 2013 - 01:39 PM
Hi ComputerCrafters,
I just finished a fully automatic melon/pumpkin farm program. This is my second ComputerCraft program and I made it just a day after my first CC program: Automatic Tree Farm. I also made a fully automatic melon/pumpkin farm program today. Link: Automatic Melon/Pumpkin Farm. You need to give it fuel in the first slot. If it runs out of fuel, it will stop. The turtle should go up two blocks and then go past the lanes and if it detects a three tall cane, it will chop down the second and third layer. When it is done with a lane, it should wait one minute.
Note: This program currently only works with 2 lanes of sugar cane. The length of the lanes doesn't matter though.
Note: You need to set up your farm like shown in this picture. The length of the lanes doesn't matter.
Please note that it is very important that the turtle starts in that position. Also, when it asks you for the length when you start it, it means the length of the sugar cane blocks.
How to install:
Make a mining turtle and enter this:
pastebin get UV0GKKkr programname
You can replace programname with whatever you want the name of the program to be.
If you don't have the http api installed:
Make a mining turtle and make an empty program (name doesn't matter). Then go to your minecraft directory and then to saves, then your world, then computer and then the search the folders there for the program you just made. Open that file in notepad (or textedit for Mac users) and paste the code from here: http://pastebin.com/UV0GKKkr
Version history:
1.0 - initial release
Screenshots:
Code:
Be sure to leave feedback and report any bugs you encounter. If you have questions feel free to ask them.
I just finished a fully automatic melon/pumpkin farm program. This is my second ComputerCraft program and I made it just a day after my first CC program: Automatic Tree Farm. I also made a fully automatic melon/pumpkin farm program today. Link: Automatic Melon/Pumpkin Farm. You need to give it fuel in the first slot. If it runs out of fuel, it will stop. The turtle should go up two blocks and then go past the lanes and if it detects a three tall cane, it will chop down the second and third layer. When it is done with a lane, it should wait one minute.
Note: This program currently only works with 2 lanes of sugar cane. The length of the lanes doesn't matter though.
Note: You need to set up your farm like shown in this picture. The length of the lanes doesn't matter.
Spoiler
How to install:
Spoiler
If you have the http api installed:Make a mining turtle and enter this:
pastebin get UV0GKKkr programname
You can replace programname with whatever you want the name of the program to be.
If you don't have the http api installed:
Make a mining turtle and make an empty program (name doesn't matter). Then go to your minecraft directory and then to saves, then your world, then computer and then the search the folders there for the program you just made. Open that file in notepad (or textedit for Mac users) and paste the code from here: http://pastebin.com/UV0GKKkr
Version history:
Spoiler
1.1 - some minor coding changes thanks to UNOBTANUIM and added a wait of 1 minute after each lane switch.1.0 - initial release
Screenshots:
Spoiler
Code:
Spoiler
write("Length: ")
length = read()
function moveForward(length)
for i = 1, length do
turtle.forward()
end
end
function switchLanes()
moveForward(1)
turtle.turnLeft()
moveForward(2)
turtle.turnLeft()
end
function dig()
turtle.dig()
moveForward(1)
turtle.digDown()
end
function roam()
for i = 1, length do
while turtle.getFuelLevel() <= 20 do
turtle.select(1)
turtle.refuel(1)
end
if turtle.detect() then
dig()
else
moveForward(1)
end
end
switchLanes()
sleep(60)
end
while turtle.getFuelLevel() <= 20 do
turtle.select(1)
turtle.refuel(1)
end
turtle.up()
turtle.up()
while true do
roam()
end
Be sure to leave feedback and report any bugs you encounter. If you have questions feel free to ask them.