Posted 06 August 2013 - 05:58 AM
Running: FTB Ultimate (v.1.1.2) Minecraft Version 1.4.7
I have 45*45 squares of farmland where I want to grow wheat in mass, around 2000 wheat each harvest. For this I want to use a mining turtle and have done so in much smaller scale with very basic code, see below:
It starts out on the edge of the farm above the wheat, gets fuel, moves forward, harvests the wheat and seeds, places a new seed from slot 2 and turns right. This is from the bend where it is turning around for the next row of wheat. Thise code is copied as needed to match the total length of the field. Obivously this is very basic and labourious procedure and not viable for a field of around 2000 blocks.
So my question is, how can I condense these repeating lines into functions where I can just tell it that the field is 45*45, that it should harvest and place seeds from anywhere in the the turtle inventory, detect when the inventory is full and return to the chest at the starting point to unload but keep a stack of seeds, detect when there is no more wheat beneath it and turn (depending on starting left or right corner of the field) and keep repeating this until it reaches the end of the field (preferrably by detecting cobblestone infront and to the left or infront and to the right depending on starting point).
Thank you in advance, schichtmschacht
I have 45*45 squares of farmland where I want to grow wheat in mass, around 2000 wheat each harvest. For this I want to use a mining turtle and have done so in much smaller scale with very basic code, see below:
turtle.refuel()
turtle.forward()
turtle.digDown()
turtle.select(2)
turtle.placeDown()
turtle.turnRight()
turtle.forward()
turtle.digDown()
turtle.select(2)
turtle.placeDown()
turtle.turnRight()
turtle.forward()
turtle.digDown()
turtle.select(2)
turtle.placeDown()
It starts out on the edge of the farm above the wheat, gets fuel, moves forward, harvests the wheat and seeds, places a new seed from slot 2 and turns right. This is from the bend where it is turning around for the next row of wheat. Thise code is copied as needed to match the total length of the field. Obivously this is very basic and labourious procedure and not viable for a field of around 2000 blocks.
So my question is, how can I condense these repeating lines into functions where I can just tell it that the field is 45*45, that it should harvest and place seeds from anywhere in the the turtle inventory, detect when the inventory is full and return to the chest at the starting point to unload but keep a stack of seeds, detect when there is no more wheat beneath it and turn (depending on starting left or right corner of the field) and keep repeating this until it reaches the end of the field (preferrably by detecting cobblestone infront and to the left or infront and to the right depending on starting point).
Thank you in advance, schichtmschacht