Simple Carrot or Potato Farm

Started by Tankhank, Dec 09, 2021, 12:47 AM

Previous topic - Next topic

Tankhank

Hi! This is my first ever Turtle program! It's not perfect, but from my testing so far, it seems to work pretty well.

https://pastebin.com/n8C3kxyF
pastebin get n8C3kxyF

There are some kinda specific requirements for this to work properly.

1st: when starting the program, the turtle must be in the left corner of the farm. This could technically be any corner of the farm, so long as the turtle is facing the correct direction. (use attached image for reference)

2nd: the farm can be any size, but it has to be fully filled in with farm land, and fully planted. Part of the turtle's code is to turn around when there aren't any carrots/potatoes under it. So, if there's a water source in the middle of the farm where crops can't be planted, then it will break. It also can't be so big that it completely fills the turtle's inventory as there is nothing in place to make sure it doesn't just drop extra items on the ground.

3rd: There must be a fuel chest, and a deposit chest behind the original starting location, as shown in the attached image. (The fuel chest is the one on top)

4th: The turtle must be pre-fueled, and have a stack of fuel in its 16th slot, as well as extra fuel in the chest. The way the refueling works is if the turtle ever has less than 64 in its 16th slot, it will take from the chest until it has 64. This means that it will wait by the chest until you deposit more fuel before it starts running again

If anyone has any trouble with it, or has any questions, don't be afraid to message me on Discord! I might make a tutorial video on this if enough people would be interested!
[attach name=2021-12-08_16.26.32.png type=image/png]295[/attach]
consider following me on Twitch - https://twitch.tv/realtankhank