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

Wheat farming problem

Started by buzzawak, 27 October 2012 - 08:26 AM
buzzawak #1
Posted 27 October 2012 - 10:26 AM
I am writting a wheat farming program and need a bit of help.

The "while turtle.compareDown() do" does not seem to work with wheat.

I have tested it by putting a dirt block in slot one and placing a dirt block
in the path of the turtle and it detects it, but doing the same with wheat and the turtle does not
recognise it.

Is this a bug ?


function farmWheat()
	lastBlock = 1
	turtle.select(1)
	repeat
		turtle.forward()
		if turtle.detectDown() then
			while turtle.compareDown() do
				turtle.digDown()
				turtle.suckDown()
			end		
		end	
		lastBlock = lastBlock + 1
	until lastBlock == 19
end

Thanks in advance
Doyle3694 #2
Posted 27 October 2012 - 10:33 AM
wheat is a item not a block. you cannot get the wheat with metadata 7(I think it is 7 atleast, don't quote me on that). There is no actual way to detect the wheat, so you are going to have to try a different perspective of doing it

PS: The 'turtle.suckDown()' in your code is unneeded, since the turtle actually gets the wheat.
buzzawak #3
Posted 27 October 2012 - 12:31 PM
Thanks for the quick reply " Pro Coder" Thats a pitty that turtles can only detect blocks.
ChunLing #4
Posted 27 October 2012 - 03:26 PM
If you want to have a turtle farm wheat, then you'll need to use bonemeal farming. This is a more efficient use of the turtle anyway as it does not have to move and can just plant/bonemeal/dig its way through all the bonemeal you can give it. A common design is to use chests so that it can run for longer, but I generally don't bother with this. By the way, does anyone know of a good use for seeds?
Doyle3694 #5
Posted 27 October 2012 - 08:53 PM
seed oil? and then make that to a alveary
and then have tons of bees
darkrising #6
Posted 27 October 2012 - 09:09 PM
If you want to automate it you could just tell the turtle to wait for a few mins between harvesting.
buzzawak #7
Posted 28 October 2012 - 06:29 AM
If you want to have a turtle farm wheat, then you'll need to use bonemeal farming. This is a more efficient use of the turtle anyway as it does not have to move and can just plant/bonemeal/dig its way through all the bonemeal you can give it. A common design is to use chests so that it can run for longer, but I generally don't bother with this. By the way, does anyone know of a good use for seeds?

I have had a play with the bonemeal. I like the way plants grow in minecraft and want a more nutural look. I have finished my wheat farm, the turtle is more robotic in its task, cutting and planting following a set route. Unaware if the wheat is ready or not, I just wait until I have a fully grown crop and set the turtle to work.
ChunLing #8
Posted 28 October 2012 - 06:34 AM
Fair enough. I just put my wheat farm in the basement or a closet, it's only a single block of dirt, a water source, a torch, and a turtle.
buzzawak #9
Posted 29 October 2012 - 06:04 AM
Started playing around with the Aperture Science Turtle Upgrade. I dont like having addons because things offen stop working when minecraft gets updated, but this upgrade mades the turtle more world aware.
buzzawak #10
Posted 29 October 2012 - 11:54 PM
Unfortunately Aperture Science Turtle Upgrade cannot recognise the difference between fully grown wheat and growth stages of wheat, so back to the drawing board.
ChunLing #11
Posted 30 October 2012 - 02:54 AM
I think that they might use a metadata for the different stages of wheat rather than changing the block ID. So, yeah, not much chance of ever getting that working.
buzzawak #12
Posted 02 November 2012 - 04:59 PM
I think that they might use a metadata for the different stages of wheat rather than changing the block ID. So, yeah, not much chance of ever getting that working.

I have come to the same conclusion.