hunters2020

Milker

Mar 6th, 2020
64
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.63 KB | None | 0 0
  1. local function getMilk()
  2.  
  3. for i = 1, 16 do
  4.  
  5. local item = turtle.getItemDetail(i)
  6. if item and item.name == "minecraft:bucket" then
  7.  
  8. turtle.select(i)
  9.  
  10. for j = 1, item.count do
  11.  
  12. turtle.place()
  13.  
  14. end
  15. end
  16.  
  17. local item = turtle.getItemDetail(i)
  18. if item and item.name == "minecraft:milk_bucket" then
  19.  
  20. turtle.select(i)
  21. turtle.dropDown()
  22.  
  23. end
  24. end
  25. end
  26.  
  27. getMilk()
  28.  
  29. while true do
  30.  
  31. os.pullEvent("turtle_inventory")
  32. getMilk()
  33.  
  34. end
Add Comment
Please, Sign In to add comment