Wassaa

craftingPainted

Oct 27th, 2021 (edited)
697
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. craftingSlots = {1,2,3,5,7,9,10,11}
  2.  
  3. function getColor(howMany)
  4.         turtle.select(6)
  5.         turtle.turnLeft()
  6.         turtle.suck(howMany)
  7.         turtle.turnRight()
  8.         turtle.select(16)
  9. end
  10.    
  11.  
  12. function craftCobble()
  13.     if turtle.getItemDetail(6) then
  14.         print("have some color left")
  15.         local amount = turtle.getItemDetail(6).count
  16.         turtle.getColor(8-amount)
  17.     else
  18.         getColor(8)
  19.         print("getting paint")
  20.     end
  21.  
  22.     for k,v in pairs(craftingSlots) do
  23.         turtle.select(v)
  24.         turtle.suck(8 - turtle.getItemCount())
  25.     end
  26.     turtle.select(16)
  27.     turtle.craft()
  28.  
  29. end
  30.  
  31.  
  32. while true do
  33.     if turtle.getItemDetail(16) then
  34.         turtle.select(16)
  35.         turtle.dropDown()
  36.     else
  37.         craftCobble()
  38.     end
  39. end
RAW Paste Data