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

[1.481][SSP] turtle.placeDown() to pick up liquids in a bucket uses the wrong block

Started by Synnoc, 05 January 2013 - 05:13 AM
Synnoc #1
Posted 05 January 2013 - 06:13 AM
I'm using the Direwolf20 Feed the Beast Mod Pack to which I've added The Twilight Forest v.1.14.0.

When I use the turtle.placeDown() command in order to pick up water in a bucket, it will take water from the block two below the turtle instead of one below.

Reproduction: Place the turtle down on a flat surface. Place a bucket in slot 1. Dig out the block directly below the turtle and fill it with a water source block. Then on the turtle, go into lua and type "turtle.placeDown()" and note you get "false". Type "turtle.up()" then "turtle.placeDown()", and notice you get "true" and a full bucket.

I also tested this by placing the turtle down with a bucket, digging out two blocks below the turtle and placing a water source block in both of them. After doing a turtle.placeDown() ang getting true and a bucket of water, I removed the top source block with a bucket to note that the water block underneath was now missing.

This will not work through a solid block. If I placed a block of cobble or glass between the turtle and the water block, it would not pick up the water block. However, it did work with an intervening torch, which blew my "it works based on turtle.detect()" theory.
GopherAtl #2
Posted 05 January 2013 - 07:14 AM
not a bug, just a quirk that apparently can't be avoided based on how it is implemented.
immibis #3
Posted 06 January 2013 - 02:40 PM
not a bug, just a quirk that apparently can't be avoided based on how it is implemented.
Of course it can be avoided. It might mean special-casing buckets though, and I don't think Cloudy would want to do that.
bwochinski #4
Posted 07 January 2013 - 05:50 PM
I ran across this bug just a moment ago, as it also prevents you from placing water directly on top of another block (when using placeDown). There's got to be some way to fix it, as this currently makes it impossible for a turtle to put fluid into a 1x1x1 hole below itself.
Immow #5
Posted 08 January 2013 - 03:18 AM
I ran across this bug just a moment ago, as it also prevents you from placing water directly on top of another block (when using placeDown). There's got to be some way to fix it, as this currently makes it impossible for a turtle to put fluid into a 1x1x1 hole below itself.

I can confirm this bug, when I use the turtle.placeDown() it drops the water one floor below.

[ ] <– turtle
… <– pocket of air
— <– floor
~~ <– water

:(/>
Cloudy #6
Posted 08 January 2013 - 03:34 AM
This will be fixed in the next release (after 1.481). Thank dan for fixing a lot of turtle.place()/turtle.attack() logic!
dissy #7
Posted 08 January 2013 - 05:25 PM
This will be fixed in the next release (after 1.481). Thank dan for fixing a lot of turtle.place()/turtle.attack() logic!

Thank you Dan and Cloudy! For this and everything else you guys do!
sjkeegs #8
Posted 09 January 2013 - 03:19 PM
Is this just related to water buckets, or is this a general bug with turtle.place(). I've just experienced a similar behavior when attempting to place cobble with a mining turtle. I was attempting to place cobble in place of any ores that I dig with the turtle.

I'll do the following:

dig()
turtle.select(2)
while not turtle.place() do
   sleep(0)
   print("place failed")
end

Sometimes it succeeds, but most of the time it fails continuously. I've noticed that if I jump in front of the turtle with my player, then it always seems to place the block in front of it.
Cloudy #9
Posted 09 January 2013 - 08:21 PM
No, buckets are a different case. Are you sure the turtle isn't digging gravel?
sjkeegs #10
Posted 10 January 2013 - 03:06 AM
Cloudy,

I've figured out what was going on. I was evaluating the progress of a turtle that mines out the four sides while digging down to bedrock. I previously noticed that while mining, some of the turtles would come back up to the surface with ores sitting on top of them, and then watched them while digging and also noticed that some of the ores would drop into some of the adjacent tunnels that were left open from an adjacent mine shaft. I thought that if I modified it to replace the ore block with a cobble block then the turtles would have a better chance of picking up everything.

So I would watch the turtle start to mine down, and observed it to be working as desired, and then jumped onto it to watch it go down. And then the turtle would stop replacing the blocks in front of it. It turns out that standing on the turtle while it's attempts to perform a turtle.place() operation was what was causing it to not work. Once I got off the turtle it would start to place the blocks again.
Cloudy #11
Posted 10 January 2013 - 04:33 AM
Yeah, I can see why that wouldn't work - if it can't place it on another surface, it will place it on itself - you must have been in the way.