Advertisement
osmarks

AutoTrash

Dec 31st, 2018
281
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.37 KB | None | 0 0
  1. local inv = peripheral.find "manipulator".getInventory()
  2. local dir = "south"
  3. local drop = {
  4.     ["minecraft:concrete:0"] = true
  5. }
  6.  
  7. local function toname(i)
  8.     return string.format("%s:%d", i.name, i.damage)
  9. end
  10.  
  11. while true do
  12.     local contents = inv.list()
  13.     for slot, item in pairs(contents) do
  14.         if drop[toname(item)] then inv.drop(slot, 64, dir) end
  15.     end
  16.     sleep(1)
  17. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement