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

turtle.placeTest (slot numb)

Started by BigSHinyToys, 04 August 2012 - 03:51 AM
BigSHinyToys #1
Posted 04 August 2012 - 05:51 AM
A function that tels you whether the item or block in the turtles slot can be placed. Useful for distinguishing wheat form seeds, Blocks from items and Blocks from fuel.

some example
coal false
wood true
wheat false
seeds true

It would be major useful in farming or construction.
Cloudy #2
Posted 04 August 2012 - 11:00 AM
Due to the way turtle.place() works this isn't possible. In order to achieve this we would have to replicate all check done by all items.
ChunLing #3
Posted 05 August 2012 - 02:49 AM
The turtle.place function already returns false if an item/block can't be placed, and you can use this information in your programs.
BigSHinyToys #4
Posted 05 August 2012 - 07:12 AM
The turtle.place function already returns false if an item/block can't be placed, and you can use this information in your programs.
that is true but other factors can be a problem for example a mob will cause a block to not be placed if a block already exists it will not place as well. That said i understand that for technical reasons this would not be a feasible addition. Thank you for replying anyway Cloudy.