Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function mine()
- redstone.setBundledOutput("right",1) --activating the tesseract through MFR rednet cable
- sleep(13) --waiting for mining wells to finish
- redstone.setBundledOutput("right",0) --deactivating the tesseract
- redstone.setOutput("bottom",true) --activating force manipulator which is directly underneath
- end
- local p = peripheral.wrap("front") --wrapping an ender chest as a peripheral. ender chest is in front of the computer
- while true do --loop
- if p.getStackInSlot(1) then --checking if there is anything in slot 1(top right) of the ender chest and running the following code if there is
- print("true")
- mine() --running the mine function which is defined above
- else --in the event that there is no item in the chest(your 'switch' is in off position) it just waits 5 seconds and exits the loop
- print("false")
- sleep(5)
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement