Jump to content




Best way of detecting lava


  • You cannot reply to this topic
4 replies to this topic

#1 KingofGamesYami

  • Members
  • 3,002 posts
  • LocationUnited States of America

Posted 22 July 2014 - 06:11 PM

I've got a turtle branch mining script I wrote to be extremely fuel efficient (as in, it will detect when it has just enough fuel to make it back) and was wondering if there would be any way to detect if there is a lava source block next to my turtle, which it could then use to increase time spent mining. Even if I just detect that there is a liquid available I can easily discern if it can be used for fuel by trying to refuel with it. I know turtle.detect() will return false, but other than that how can I know it isn't air?

#2 hilburn

  • Members
  • 153 posts
  • LocationLondon, England

Posted 22 July 2014 - 07:03 PM

AFAIK the only way to detect liquids is something along the lines of:

turtle.select(bucketslot)
if turtle.place() then --#if picked up liquid
	 if turtle.refuel() then
		  --#its lava
	 else
		  turtle.place() --#empty the bucket
	 end
end


#3 KingofGamesYami

  • Members
  • 3,002 posts
  • LocationUnited States of America

Posted 22 July 2014 - 09:05 PM

Thanks.

#4 bigbrainiac10

  • Members
  • 41 posts

Posted 22 July 2014 - 09:27 PM

If you want it to refuel using lava, if you have the EnderStorage mod you could use a endertank and refuel using that?

Other than that, hilburn's way is the only real way to do it using the environment.

#5 KingofGamesYami

  • Members
  • 3,002 posts
  • LocationUnited States of America

Posted 22 July 2014 - 10:11 PM

No, I mean I want my turtle to refuel when it encounters lava. Here's a link to my script (which i will be releasing shortly): http://pastebin.com/ZpKSLTgW





1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users