Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local hopper = 'right'
- local extractor = 'bottom'
- local locker = 'top'
- local engine = 'back'
- local state = 'disabled'
- redstone.setOutput(hopper, true)
- redstone.setOutput(engine, true)
- while true do
- if state == 'disabled' then
- if redstone.getInput(locker) == true then
- print('Items for processing')
- redstone.setOutput(hopper, false)
- redstone.setOutput(engine, false)
- state = 'enabled-starting'
- end
- elseif state == 'enabled-starting' then
- print('Waiting on extractor start')
- if redstone.getInput(extractor) == false then
- state = 'enabled'
- end
- elseif state == 'enabled' then
- if redstone.getInput(extractor) == true then
- print('Processing complete')
- redstone.setOutput(hopper, true)
- redstone.setOutput(engine, true)
- state = 'disabled'
- end
- end
- sleep(1)
- end
Advertisement
Add Comment
Please, Sign In to add comment