Advertisement
lolxorlol

CraftKnifes

Jan 20th, 2022 (edited)
957
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. local input = peripheral.wrap("left")
  2. local output = peripheral.wrap("bottom")
  3.  
  4. function craftAndPush()
  5.   input.pushItems("front", 1, 1)
  6.   turtle.suck(1)
  7.   turtle.transferTo(6, 1)
  8.   input.pushItems("front", 2, 1)
  9.   turtle.suck(1)
  10.   turtle.craft()
  11.   turtle.dropDown()
  12. end
  13.  
  14. while true do
  15.   local inputList = input.list()
  16.   if(#inputList < 2) then
  17.     os.exit()
  18.   end
  19.  
  20.   local outputItem = output.getItemDetail(1)
  21.   if(outputItem == nil) then
  22.     craftAndPush()
  23.   end
  24.  
  25.   os.sleep(2)
  26. end
  27.  
Advertisement
Advertisement
Advertisement
RAW Paste Data Copied
Advertisement