Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- extractor = peripheral.wrap("bottom")
- input_direction = "left"
- output_direction = "right"
- function hasOre()
- items = extractor.getAllStacks()
- for i = 1,#items do
- if string.find(items[i]["rawName"],"tile") then
- return true
- end
- end
- return false
- end
- while true do
- local event = os.pullEvent("redstone")
- while rs.getInput(input_direction) do
- sleep(1)
- rs.setOutput(output_direction,hasOre())
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement