Jump to content




Farming Turtles


18 replies to this topic

#1 Luanub

    Lua Nub

  • Members
  • 1,135 posts
  • LocationPortland OR

Posted 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. ;)/>

#2 WireDemon

  • New Members
  • 2 posts

Posted 27 February 2012 - 07:57 AM

Turtles can only place blocks. Which I assume it calculates based on the item's id number.

#3 wilcomega

  • Members
  • 466 posts
  • LocationHolland

Posted 27 February 2012 - 12:45 PM

they can also break blocks

#4 cokacola

  • Members
  • 5 posts

Posted 27 February 2012 - 12:59 PM

It actually is possible to plant things.
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.

#5 6677

  • Members
  • 197 posts
  • LocationCambridgeshire, England

Posted 27 February 2012 - 01:03 PM

View Postwilcomega, on 27 February 2012 - 12:45 PM, said:

they can also break blocks
This is something we all knew and weren't referring to.
When we mean can only place block we mean that as in cannot place some obscure items and use items such as bonemeal etc.

#6 cokacola

  • Members
  • 5 posts

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.

#7 Sebra

  • Members
  • 726 posts

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?

#8 Liraal

  • New Members
  • 477 posts
  • LocationPoland

Posted 27 February 2012 - 02:25 PM

i think it should. disk drives do, anyway, but they don't trigger events when transferring floppies.

#9 Sebra

  • Members
  • 726 posts

Posted 27 February 2012 - 02:44 PM

I think I've seen events...
Turtle inventory can be "special"

#10 Luanub

    Lua Nub

  • Members
  • 1,135 posts
  • LocationPortland OR

Posted 27 February 2012 - 09:35 PM

View PostWireDemon, on 27 February 2012 - 07:57 AM, said:

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.

#11 6677

  • Members
  • 197 posts
  • LocationCambridgeshire, England

Posted 28 February 2012 - 02:44 PM

View Postcokacola, on 27 February 2012 - 01:44 PM, said:

so seeds don't work the same as saplings I guess.
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.
Seeds are technically a block.

#12 Luanub

    Lua Nub

  • Members
  • 1,135 posts
  • LocationPortland OR

Posted 28 February 2012 - 09:37 PM

View Post6677, on 28 February 2012 - 02:44 PM, said:

View Postcokacola, on 27 February 2012 - 01:44 PM, said:

so seeds don't work the same as saplings I guess.
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.
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

Edited by luanub, 28 February 2012 - 09:48 PM.


#13 6677

  • Members
  • 197 posts
  • LocationCambridgeshire, England

Posted 29 February 2012 - 11:48 AM

View Postluanub, on 28 February 2012 - 09:37 PM, said:

View Post6677, on 28 February 2012 - 02:44 PM, said:

View Postcokacola, on 27 February 2012 - 01:44 PM, said:

so seeds don't work the same as saplings I guess.
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.
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
This is exactly what I did. It worked fine for me with a mining turtle.

#14 Luanub

    Lua Nub

  • Members
  • 1,135 posts
  • LocationPortland OR

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


#15 FuzzyPurp

    Part-Time Ninja

  • Members
  • 510 posts
  • LocationHarlem, NY

Posted 01 March 2012 - 05:23 AM

View Postcokacola, on 27 February 2012 - 01:44 PM, said:

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

#16 Sebra

  • Members
  • 726 posts

Posted 01 March 2012 - 02:40 PM

View PostFuzzyPurp, on 01 March 2012 - 05:23 AM, said:

You the deployer in rp2 creates a fake player(lol) to do those things
Thanks Eloraam <3 I want such ability to turtles.

#17 DarkEspeon

  • Members
  • 57 posts

Posted 21 January 2013 - 10:06 AM

@luanub: it would help if the ground was tilled in the video... lol

#18 Luanub

    Lua Nub

  • Members
  • 1,135 posts
  • LocationPortland OR

Posted 21 January 2013 - 11:45 AM

View Postnicse4, on 21 January 2013 - 10:06 AM, said:

@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?

#19 Lyqyd

    Lua Liquidator

  • Moderators
  • 8,465 posts

Posted 21 January 2013 - 12:53 PM

Locked.





1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users