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

[1.6.3][SSP] turtle.placeDown() confused by tall grass two blocks away

Started by randalOneL, 29 June 2014 - 01:32 AM
randalOneL #1
Posted 29 June 2014 - 03:32 AM
This observation is similar to the post by Inksaver, May 25 2014 09:08 AM.

turtle.placeDown() successfully places dirt directly below turtle unless there is tall grass or fern or vine two blocks down (in the block below the empty space below the turtle). If one of these plants is present then the dirt replaces it, leaving an empty space where the dirt was supposed to go. If the plant is directly below the turtle, the dirt replaces the plant as expected. These plants are special in that if they are in front of the turtle, then turtle.detect() will return true, but turtle.forward() will not be obstructed and the turtle will destroy the block without a drop (not even occasional seeds from grass). This is the same behavior that the player experiences in creative mode. You can place a block on top of a flower but if you try the same thing with grass, the grass will be lost and the block will be in it's place. Even so, we expect the turtle to place a block in an empty space directly above, in front or below itself without being affected by any block that might be in a space farther away.

This is my first post. I've been playing with computer craft for a month or so and I really enjoy it. Thanks to all who work to create, maintain and improve it.
Sebra #2
Posted 29 June 2014 - 10:39 AM
Known bug.
Cranium #3
Posted 30 June 2014 - 04:22 PM
It's a known problem, but I don't think there's really an easy way to fix it. turtle.place() uses the item in the inventory in such a way that a player would(in most cases). If you've ever placed a block down when you're in tall grass, you'll notice that instead of placing the block next to the tall grass, it replaces the grass. This is currently consistent with how the player interacts in such a way. However, it is not expected behaviour, and I'd like to see this change so that you can predict where a turtle is going to place a block.
Sebra #4
Posted 30 June 2014 - 07:40 PM
I think some attribute of such blocks determine placing behavior.
If CC detect such situation it can behave as an air here.
But I'm really do not know used algorithm.
Inksaver #5
Posted 17 July 2014 - 07:23 PM
Workaround function posted Here