Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local tArgs = { ... }
- local slotWithEnderChest = 16
- if #tArgs > 0 then
- slotWithEnderChest = tonumber(tArgs[1])
- end
- function empty()
- -- Empty the turtle's inventory
- currentSlot = turtle.getSelectedSlot()
- -- Check if the ender chest can be placed
- if turtle.detectUp() then
- turtle.digUp()
- end
- -- Place the ender chest
- turtle.select(slotWithEnderChest)
- turtle.placeUp()
- chest = peripheral.wrap("up")
- for i=1,16 do
- turtle.select(i)
- turtle.dropUp()
- end
- turtle.select(slotWithEnderChest)
- turtle.digUp()
- turtle.select(currentSlot)
- end
- empty()
Advertisement
Add Comment
Please, Sign In to add comment