Update 'Turtle/Turtle.lua'

This commit is contained in:
manuel 2023-01-13 17:21:17 +00:00
parent 7eff094072
commit 33e38c9fad

View File

@ -186,4 +186,21 @@ function Turtle:isInvEmpty(update)
end
end
return true
end
function Turtle:refuel(goBack)
if (goBack == nil) then goBack = true end
if(goBack == true) then
goBack = {self.x, self.y, self.z, self.dir}
end
self:clearInv("coalChest")
turtle.select(1)
turtle.suckDown()
turtle.refuel()
if (goBack ~= false) then
self:log("moving to goBack")
self:moveTo(goBack)
end
end