Update 'Turtle/Wheat.lua'
This commit is contained in:
parent
88e0fa46a8
commit
7e8e495ee2
@ -135,3 +135,27 @@ function Wheat:createMatrix()
|
|||||||
end
|
end
|
||||||
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
|
Loading…
x
Reference in New Issue
Block a user