Advertisement
Sir_Popsilots

Concrete Powder Into Concrete

Jun 8th, 2022 (edited)
711
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.58 KB | None | 0 0
  1. local function findPowder()
  2.     for i = 1 ,16 do
  3.         if turtle.getItemCount(i) > 0 then
  4.             local item = turtle.getItemDetail(i)
  5.             if string.find(item.name,"powder") then
  6.                 return i
  7.             end
  8.         end
  9.     end
  10.     return 0
  11. end
  12.  
  13. local function MainRun()
  14.     local slot = findPowder()
  15.     if slot ~= 0 then
  16.         turtle.select(slot)
  17.         local slotcount = turtle.getItemCount()
  18.         for h = 1,slotcount do
  19.             turtle.place()
  20.             turtle.dig()
  21.         end
  22.     end
  23. end
  24.  
  25. for j = 1 , 16 do
  26.     MainRun()
  27. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement