Guest User

items.lua

a guest
Jan 26th, 2023
7,311
0
Never
1
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.52 KB | None | 0 0
  1. local inputChest = peripheral.wrap("right")
  2. local badItemsChest = peripheral.wrap("left")
  3. local goodItemsChest = peripheral.wrap("back")
  4.  
  5. while true do
  6.     for slot, item in pairs(inputChest.list()) do
  7.        
  8.         local itemDetails = inputChest.getItemDetail(slot)
  9.    
  10.         if itemDetails.nbt then    
  11.             inputChest.pushItems(peripheral.getName(badItemsChest), slot)      
  12.         else
  13.             inputChest.pushItems(peripheral.getName(goodItemsChest), slot)
  14.         end
  15.      
  16.     end
  17. end
  18.  
  19.  
  20.  
Advertisement
Comments
  • LeFeTiicH3
    250 days
    # text 0.13 KB | 0 0
    1. It doesen't work for me, any solution? it says string "JqXL51Es" is not working, attempt to index local 'inputChest' a nil value
    2.  
Add Comment
Please, Sign In to add comment