Posted 20 May 2014 - 03:30 PM
I am working on a felling program right now and was wondering if you had a simpler way of clearing the extra stuff in the inventory? Here's my code.
--[[
Background info
Saplings go in slot 1
Bonemeal goes in slot 2
Coal goes in slot 16
Trying to empty the wood it cuts and any extra
Saplings and Bonemeal
--]]
-- Empty Inventory
function emptyInventory()
for inv = 3, 15, 1 do
turtle.select(inv)
if turtle.compareTo(1) == true then
turtle.dropDown()
elseif turtle.compareTo(2) == true then
turtle.turnLeft()
turtle.drop()
turtle.turnRight()
end
end
end
-- End Empty Inventory
Edited on 20 May 2014 - 01:31 PM