Advertisement
Zac_McDonald

CC: Flowers

Oct 2nd, 2018
434
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.70 KB | None | 0 0
  1. -- Turtle Program for making Botania flowers
  2.  
  3. function refuel ()
  4.     if turtle.getFuelLevel() < 100 then
  5.         i = turtle.getSelectedSlot()
  6.         turtle.select(16)
  7.         turtle.refuel()
  8.         turtle.select(i)
  9.     end
  10. end
  11.  
  12. function main ()
  13.     turtle.select(1)
  14.     bucketTest = turtle.getItemDetail()
  15.  
  16.     -- If we have a water bucket, start crafting
  17.     if (bucketTest.name == "minecraft:water_bucket") then
  18.         turtle.drop()
  19.         sleep(0.1)
  20.         turtle.suck()
  21.         for i=2,14 do
  22.             turtle.select(i)
  23.             turtle.drop(1)
  24.         end
  25.         sleep(0.1)
  26.  
  27.         turtle.select(15)
  28.         turtle.suck()
  29.     end
  30.  
  31.     -- Refill bucket process
  32.     turtle.select(1)
  33.     turtle.forward()
  34.     turtle.place()
  35.     turtle.back()
  36.  
  37.     refuel();
  38. end
  39.  
  40. while (true) do
  41.     main()
  42. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement