This is a read-only snapshot of the ComputerCraft forums,
taken in April 2020.
Farming Turtles
Started by Luanub, 27 February 2012 - 06:28 AMPosted 27 February 2012 - 07:28 AM
So far I've had no luck with getting a Turtle to plant wheat seeds. Is this something that is doable? If not is it something that is planned for future releases? If not it should be. ;)/>/>
Posted 27 February 2012 - 07:57 AM
Turtles can only place blocks. Which I assume it calculates based on the item's id number.
Posted 27 February 2012 - 12:45 PM
they can also break blocks
Posted 27 February 2012 - 12:59 PM
It actually is possible to plant things.
Check out my code for planting rows of sapplings:
I have seen the bot plant wheat and such too, so it should be able to fine, just make sure you are one block above the ground when planting.
Check out my code for planting rows of sapplings:
args = { ... }
i=0
i2=0
tt=0
if #args ~= 2 then
print( "Usage: tree <saplings> <rowsize>" )
return
end
while(i < tonumber(args[1])) do
if(i2>tonumber(args[2])) then
if(tt == 0) then
turtle.turnRight()
while(turtle.detect()) do
turtle.up()
end
turtle.forward()
while(turtle.detect()) do
turtle.up()
end
turtle.forward()
while(turtle.detect()) do
turtle.up()
end
turtle.turnRight()
while(turtle.detect()) do
turtle.up()
end
turtle.forward()
tt = 1
else
turtle.turnLeft()
while(turtle.detect()) do
turtle.up()
end
turtle.forward()
while(turtle.detect()) do
turtle.up()
end
turtle.forward()
while(turtle.detect()) do
turtle.up()
end
turtle.turnLeft()
while(turtle.detect()) do
turtle.up()
end
turtle.forward()
tt = 0
end
i2=0
end
for i1=1,10 do
if(turtle.getItemCount(i1) > 0) then
turtle.select(i1)
break
end
end
if(turtle.detectDown()) then
turtle.up()
end
turtle.placeDown()
while(turtle.detect()) do
turtle.up()
end
turtle.forward()
while(turtle.detect()) do
turtle.up()
end
turtle.forward()
while(turtle.detect()) do
turtle.up()
end
turtle.forward()
while(not turtle.detectDown()) do
turtle.down()
end
i=i+1
i2=i2+1
end
I know it could be a lot smaller but I couldn't be bothered.I have seen the bot plant wheat and such too, so it should be able to fine, just make sure you are one block above the ground when planting.
Posted 27 February 2012 - 01:03 PM
This is something we all knew and weren't referring to.they can also break blocks
When we mean can only place block we mean that as in cannot place some obscure items and use items such as bonemeal etc.
Posted 27 February 2012 - 01:44 PM
so seeds don't work the same as saplings I guess.
I don't think it is possible to get it to do anything involving items and right-clicking.
There is a block in redpower that places items on right click, you could place a bunch and have the turtle go and power them.
You could also place them but it wouldn't be incredibly easy to get the seeds into the machine.
I don't think it is possible to get it to do anything involving items and right-clicking.
There is a block in redpower that places items on right click, you could place a bunch and have the turtle go and power them.
You could also place them but it wouldn't be incredibly easy to get the seeds into the machine.
Posted 27 February 2012 - 02:16 PM
you can easily place transposer to drop items into deployer if you do not want to use RP tubes to provide seeds.
But how can turtle get seeds itself? By sitting on RP tube? Will it connect?
But how can turtle get seeds itself? By sitting on RP tube? Will it connect?
Posted 27 February 2012 - 02:25 PM
i think it should. disk drives do, anyway, but they don't trigger events when transferring floppies.
Posted 27 February 2012 - 02:44 PM
I think I've seen events…
Turtle inventory can be "special"
Turtle inventory can be "special"
Posted 27 February 2012 - 09:35 PM
Turtles can only place blocks. Which I assume it calculates based on the item's id number.
This is why the seeds wont work, their item id is clasified as an Item and not a block.
Hopefully in the future they wont be limited by a block id classification, seems odd to be able to plant a tree and not seeds.
For now I guess I'll have to find an alternative to fully automate my farm.
Posted 28 February 2012 - 02:44 PM
They most certainly do. You have to be 1 block ABOVE the farmland, ie you don't hover the turtle on the farmland and placeDown onto it, you hover with a 1 block gap and place down.so seeds don't work the same as saplings I guess.
Seeds are technically a block.
Posted 28 February 2012 - 09:37 PM
They most certainly do. You have to be 1 block ABOVE the farmland, ie you don't hover the turtle on the farmland and placeDown onto it, you hover with a 1 block gap and place down.so seeds don't work the same as saplings I guess.
Seeds are technically a block.
Do you have any working code for this?
I'm trying it manually in the lua shell and it will not place a seed being 1 block above the farmland and doing turtle.placeDown()
I've also tried this, doesn't work either. turtle.placeDown() always reports false.
Spoiler
function plant()
print ()
print ("Planting Seeds...")
turtle.up()
turtle.select( 1 )
for x = 1, 8 do
turtle.forward()
turtle.placeDown()
end
for x = 1, 8 do
turtle.back()
end
turtle.down()
main()
end
Edited on 28 February 2012 - 08:48 PM
Posted 29 February 2012 - 11:48 AM
This is exactly what I did. It worked fine for me with a mining turtle.They most certainly do. You have to be 1 block ABOVE the farmland, ie you don't hover the turtle on the farmland and placeDown onto it, you hover with a 1 block gap and place down.so seeds don't work the same as saplings I guess.
Seeds are technically a block.
Do you have any working code for this?
I'm trying it manually in the lua shell and it will not place a seed being 1 block above the farmland and doing turtle.placeDown()
I've also tried this, doesn't work either. turtle.placeDown() always reports false.Spoiler
function plant() print () print ("Planting Seeds...") turtle.up() turtle.select( 1 ) for x = 1, 8 do turtle.forward() turtle.placeDown() end for x = 1, 8 do turtle.back() end turtle.down() main() end
Posted 29 February 2012 - 01:26 PM
Yea I don't think it works… Anyone else have any luck? The below video will show that the code works, but the seeds do not.
Spoiler
[media]http://www.youtube.com/watch?v=cYDSjYRMQ4s[/media]Posted 01 March 2012 - 05:23 AM
so seeds don't work the same as saplings I guess.
I don't think it is possible to get it to do anything involving items and right-clicking.
There is a block in redpower that places items on right click, you could place a bunch and have the turtle go and power them.
You could also place them but it wouldn't be incredibly easy to get the seeds into the machine.
You the deployer in rp2 creates a fake player(lol) to do those things
Posted 01 March 2012 - 02:40 PM
Thanks Eloraam <3 I want such ability to turtles.You the deployer in rp2 creates a fake player(lol) to do those things
Posted 21 January 2013 - 10:06 AM
@luanub: it would help if the ground was tilled in the video… lol
Posted 21 January 2013 - 11:45 AM
@luanub: it would help if the ground was tilled in the video… lol
The dirt was tilled look closer. Also at the time this was posted turtles could neither til the ground nor plant seeds. Why reply to such an old post?
Posted 21 January 2013 - 12:53 PM
Locked.