Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local items = {'minecraft:gold_ingot', 'minecraft:gold_nugget','minecraft:diamond_axe','minecraft:diamond_sword','minecraft:diamond_boots','minecraft:diamond_shovel','minecraft:diamond_helmet','minecraft:diamond_pickaxe','minecraft:diamond_leggings','minecraft:diamond_chestplate'}
- local chest = peripheral.wrap('top')
- local chestDown = peripheral.wrap("bottom")
- local function contains(table, val)
- for i=1,#table do
- if table[i] == val then
- return true
- end
- end
- return false
- end
- while true do
- for slot, item in pairs(chest.list()) do
- if contains(items, item.name) == false then
- print(item.name .. ' - NOT VALID')
- chestDown.pullItems(peripheral.getName(chest),slot)
- else
- print(item.name .. ' - VALID')
- end
- end
- sleep(1)
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement