Update 'Turtle/Wheat.lua'

This commit is contained in:
manuel 2023-01-08 18:19:16 +00:00
parent 88e0fa46a8
commit 7e8e495ee2

View File

@ -134,4 +134,28 @@ function Wheat:createMatrix()
end
end
end
end
function Wheat:clearInv(goBack)
if (goBack == nil) then goBack = true end
if(goBack == true) then
goBack = {self.x, self.y, self.z, self.dir}
end
if (self:isInInv("seed", true)) then
self:moveTo("seedChest")
self:dropItemsDown("seed", false)
end
if (self:isInInv("coal", false)) then
self:moveTo("coalChest")
self:dropItemsDown("coal", false)
end
if (self:isInvEmpty(true) == false) then
self:moveTo("outputChest")
self:dropItemsDown("any", false)
end
if (goBack ~= false) then
self:log("moving to goBack")
self:moveTo(goBack)
end
end