Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local arg1 = ...
- local direction = arg1
- rednet.open("right")
- local redstoneOutput = false
- if direction == nil then
- error("You must launch this program with a direction argument! Perferably using startup.lua!")
- end
- while true do
- id, message, password = rednet.receive("u", 0.1)
- redstoneOutput = false
- if id == 1 then
- if message == direction then
- redstoneOutput = true
- end
- end
- redstone.setOutput("back", redstoneOutput)
- end
- rednet.close("right")
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement