xmarks

Blockify

Mar 16th, 2022 (edited)
570
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 1.03 KB | None | 0 0
  1. -- FTB Blockify
  2. -- Made by Xmarks
  3. -- https://www.youtube.com/channel/UCA6oAnFqdDcc0sa6H8G5DSA
  4. -- Program makes blocks out of Ingots
  5. -- ***************************************
  6. -- * Ingots are taken from above chest   *
  7. -- * Blocks are stored into front chest  *
  8. -- * Excess is dropped back to top chest *
  9. -- ***************************************
  10.  
  11. local function blockify()
  12.     for i = 1, 3 do
  13.         turtle.select(i)
  14.         while (turtle.getItemCount(i) < 64) do
  15.             turtle.suckUp(1)
  16.         end
  17.     end
  18.    
  19.     for i = 5, 7 do
  20.         turtle.select(i)
  21.         while (turtle.getItemCount(i) < 64) do
  22.             turtle.suckUp(1)
  23.         end
  24.     end
  25.    
  26.     for i = 9, 11 do
  27.         turtle.select(i)
  28.         while (turtle.getItemCount(i) < 64) do
  29.             turtle.suckUp(1)
  30.         end
  31.     end
  32. end
  33.  
  34. local function cleanInventory()
  35.     turtle.select(4)
  36.     turtle.dropUp()
  37.    
  38.     turtle.select(8)
  39.     turtle.dropUp()
  40.    
  41.     turtle.select(12)
  42.     turtle.dropUp()
  43.    
  44.     for i = 13, 16 do
  45.         turtle.dropUp()
  46.     end
  47. end
  48.  
  49. while true do
  50.     blockify()
  51.     cleanInventory()
  52.  
  53.     turtle.select(16)
  54.     turtle.craft()
  55.     turtle.drop()
  56. end
Add Comment
Please, Sign In to add comment