aPisC

EnderSmeltery

Jul 28th, 2016
69
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.40 KB | None | 0 0
  1. SmelteryName = "back"
  2. MinAmount = 750
  3. RedstoneOut = "top"
  4. SleepTime = 5
  5.  
  6. -- Code
  7.  
  8. sm = peripheral.wrap(SmelteryName)
  9.  
  10. while true do
  11.  
  12. am = 0
  13. info = sm.getInfo()
  14.  
  15. if info.contents ~= nil then
  16. am = info.contents.amount
  17. end
  18.  
  19. print(am)
  20.  
  21. if am >= MinAmount then
  22.  
  23. redstone.setOutput(RedstoneOut, true)
  24. os.sleep(0.05)
  25. redstone.setOutput(RedstoneOut, false)
  26. os.sleep(SleepTime)
  27.  
  28. end
  29.  
  30. end
Add Comment
Please, Sign In to add comment