Update 'Turtle/Turtle.lua'
This commit is contained in:
parent
7eff094072
commit
33e38c9fad
@ -187,3 +187,20 @@ function Turtle:isInvEmpty(update)
|
|||||||
end
|
end
|
||||||
return true
|
return true
|
||||||
end
|
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
|
Loading…
x
Reference in New Issue
Block a user