Advertisement
ecco7777

exnihilo ore compressor

Aug 13th, 2018
182
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.59 KB | None | 0 0
  1. p=peripheral.wrap("bottom")
  2. function craft(i1,i2)
  3. i2=(i2-math.fmod(i2,4))/4
  4.   p.pushItem("up",i1,i2,1)
  5.   p.pushItem("up",i1,i2,2)
  6.   p.pushItem("up",i1,i2,5)
  7.   p.pushItem("up",i1,i2,6)
  8.   turtle.craft()
  9. if string.find(item.name,"powdered") then
  10.     turtle.dropUp()
  11. else
  12.   turtle.drop()
  13. end
  14. end
  15. p.condenseItems()
  16. for i=1,p.getInventorySize() do
  17. item=p.getStackInSlot(i)
  18.   if item~=nil then
  19.     if string.find(item.name,"broken") or string.find(item.name,"crushed") or string.find(item.name,"powdered") then
  20.       if item.qty>=4 then
  21.         craft(i,item.qty)
  22.       end
  23.     end
  24.   end
  25. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement