3057 posts
Location
United States of America
Posted 22 July 2014 - 07: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?
154 posts
Location
London, England
Posted 22 July 2014 - 08: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
3057 posts
Location
United States of America
Posted 22 July 2014 - 10:05 PM
Thanks.
42 posts
Posted 22 July 2014 - 10: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.
3057 posts
Location
United States of America
Posted 22 July 2014 - 11: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