Advertisement
Wassaa

coalDrop

Dec 11th, 2016
118
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1.  
  2. function drop_coal()
  3.     coal = turtle.getItemCount()
  4.     if(coal<10) then
  5.         turtle.suckUp(55)
  6.         turtle.drop(1)
  7.     else
  8.        turtle.drop(1)
  9.     end    
  10. end
  11.  
  12. while true do
  13.     if redstone.getAnalogInput('front')==0 then
  14.         drop_coal()
  15.         os.sleep(0.1)
  16.     else
  17.         os.sleep(0.3)
  18.         print("wait 1")
  19.     end
  20. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement