Advertisement
TechManDylan

BlockObserver

Nov 24th, 2021 (edited)
1,055
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.40 KB | None | 0 0
  1. while true do
  2. if turtle.inspect(true) then
  3. redstone.setOutput("right",true, 15)
  4. term.clear()
  5. term.setCursorPos(1,1)  
  6. print("Found a block in front.")
  7. print("Turning on the redstone.")
  8. sleep(1)
  9. if turtle.inspect(false) then redstone.setOutput("right",false)
  10. term.clear()
  11. term.setCursorPos(1,1)  
  12. print("Block no longer in front.")
  13. print("Turning off the redstone.")
  14. sleep(1)
  15. end
  16. end
  17. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement