diff --git a/Turtle/Wheat.lua b/Turtle/Wheat.lua index 6831013..3e25212 100644 --- a/Turtle/Wheat.lua +++ b/Turtle/Wheat.lua @@ -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 \ No newline at end of file