Flemmli97

3x3 Autocraft Up

Oct 20th, 2020
988
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. --Crafts a 3x3 "compressing recipe" supplied by a container in front and drops it below
  2. if table.getn(arg) < 1 then print("How many items to craft at once?") amount = tonumber(read()) else amount = tonumber(arg[1]) end
  3. while true do
  4.   for i=1, 3 do
  5.     for j=0, 2 do
  6.       local slot = i+j*4
  7.       turtle.select(slot)
  8.       turtle.suck(math.min(amount,math.max(0,amount-turtle.getItemCount(slot))))
  9.     end
  10.   end
  11.   turtle.select(16)
  12.   turtle.craft(amount)
  13.   turtle.dropUp()
  14. end
RAW Paste Data