Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- -- Drops all slots forward except items from list in above storage
- function Forward(notDroppedBlocks)
- local bDrop = true
- local returnValue = true
- for i = 1, 16, 1 do
- if turtle.getItemCount(i) > 0 then
- turtle.select(i)
- if notDroppedBlocks then
- for j = 1, #notDroppedBlocks, 1 do
- local itemDetail = turtle.getItemDetail()
- if itemDetail then
- if itemDetail.name == notDroppedBlocks[j] then
- bDrop = false
- end
- end
- end
- end
- if bDrop then
- if not turtle.drop() then
- returnValue = false
- end
- end
- bDrop = true
- end
- end
- return returnValue
- end
- -- Drops all slots up except items from list in above storage
- function Up(notDroppedBlocks)
- local bDrop = true
- local returnValue = true
- for i = 1, 16, 1 do
- if turtle.getItemCount(i) > 0 then
- turtle.select(i)
- if notDroppedBlocks then
- for j = 1, #notDroppedBlocks, 1 do
- local itemDetail = turtle.getItemDetail()
- if itemDetail then
- if itemDetail.name == notDroppedBlocks[j] then
- bDrop = false
- end
- end
- end
- end
- if bDrop then
- if not turtle.dropUp() then
- returnValue = false
- end
- end
- bDrop = true
- end
- end
- return returnValue
- end
- -- Drops all slots down except items from list in above storage
- function Down(notDroppedBlocks)
- local bDrop = true
- local returnValue = true
- for i = 1, 16, 1 do
- if turtle.getItemCount(i) > 0 then
- turtle.select(i)
- if notDroppedBlocks then
- for j = 1, #notDroppedBlocks, 1 do
- local itemDetail = turtle.getItemDetail()
- if itemDetail then
- if itemDetail.name == notDroppedBlocks[j] then
- bDrop = false
- end
- end
- end
- end
- if bDrop then
- if not turtle.dropDown() then
- returnValue = false
- end
- end
- bDrop = true
- end
- end
- return returnValue
- end
- return { Forward = Forward, Up = Up, Down = Down}
Add Comment
Please, Sign In to add comment