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

[1.6x] turtle.detect() detects liquids as solid blocks?

Started by Sharidan, 10 April 2014 - 01:53 AM
Sharidan #1
Posted 10 April 2014 - 03:53 AM
I've spent the past few days reading thread after thread, post after post and googling (search feature on this site is a joke and utterly useless, sorry), yet I havnt been able to find any concrete trustable information about this. Now I reached the end of how much frustration I'm willing to accept, trying to find an answer for this, so please (forum admins) don't kick my ass for posting this. I may be among those unique few that actually DO spend days trying to find the answer, before posting the question.

In 1.6x releases it seems that the turtle's .detect() methods have changed. They appear to now detect liquids (i.e. water / lava - both stationary and flowing) as a solid block. Any attempts to dig out the water results in a false response from the .dig() method, since you can't dig liquids.

turtle.detect(), turtle.detectUp() and turtle.detectDown() all consider liquids as solid blocks, thus returning true when "facing" a liquid.

Is this change an intended change or is this a straight up bug?


-- This will stall the turtle indefinately on 1.6x when it hits a liquid.
-- Example:
for m = 1, 32 do
  if (not turtle.forward() then
    while turtle.detect() do
	  turtle.dig()
    end -- while
  end -- if
end -- for
Cranium #2
Posted 10 April 2014 - 05:46 AM
Since we've had multiple versions recently, could you specify which version exactly you are using? If you're not using 1.63 pr1, you may want to consider trying that out, and if the issue persists, ensure that the duplicate post you made there is followed up on. If you are using 1.63 pr1, then we'll close this topic, as bug reports for the prereleases need to go in the correct area to ensure that they are monitored properly.

EDIT: Locked temporarily, as it is a duplicate of a prerelease bug report. Link here: http://www.computercraft.info/forums2/index.php?/topic/16882-computercraft-16-beta-bug-reports/page__view__findpost__p__172640
Edited on 10 April 2014 - 03:51 AM
dan200 #3
Posted 15 April 2014 - 12:56 PM
Fixed in 1.63pr2