Posted 17 May 2013 - 01:07 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 sugar cane farm program today. Link: Automatic Sugar Cane Farm. You need to give it fuel in the first slot. If it runs out of fuel, it will stop.
Note: This program currently only works with 2 lanes of melons/pumpkins. 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 and that the 4 logs (can be any solid block) at the end of the lanes are there. The 4 logs (or any solid block) keep the melons/pumpkins from growing at those places. When that happens, the turtle won't mine them. Also, when it asks you for the length when you start it, it means the length of the dirt blocks holding the plants.
How to install:
Make a mining turtle and enter this:
pastebin get K7WrizsZ 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/K7WrizsZ
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 sugar cane farm program today. Link: Automatic Sugar Cane Farm. You need to give it fuel in the first slot. If it runs out of fuel, it will stop.
Note: This program currently only works with 2 lanes of melons/pumpkins. 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 K7WrizsZ 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/K7WrizsZ
Version history:
Spoiler
1.1 - minor coding changes thanks to UNOBTANIUM and added a 1 minute wait 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(2)
turtle.turnLeft()
moveForward(4)
turtle.turnLeft()
moveForward(1)
end
function roam()
for i = 1, length do
while turtle.getFuelLevel() <= 20 do
turtle.select(1)
turtle.refuel(1)
end
if turtle.detect() then
turtle.dig()
end
moveForward(1)
end
switchLanes()
sleep(60)
end
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.