lewile1

Turtle Item Compressor

Dec 25th, 2015
106
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.58 KB | None | 0 0
  1. -- Intended to craft items in turtle
  2.  
  3. rDir = "east"
  4. fDir = "north"
  5.  
  6. local rInv = peripheral.wrap("right")
  7. local fInv = peripheral.wrap("front")
  8.  
  9. turtle.select(16)
  10.  
  11. piston = { [1]="minecraft:planks",[2]="minecraft:planks",[3]="minecraft:planks",[5]="minecraft:cobblestone",[6]="minecraft:iron_ingot",[7]="minecraft:cobblestone",[9]="minecraft:cobblestone",[10]="minecraft:redstone",[11]="minecraft:cobblestone"}
  12.  
  13. allInv = rInv.getAllStacks()
  14.  
  15. for k,v in pairs(piston) do
  16.     for i=1,27 do
  17.         if allInv[i].basic().id == v then
  18.             rInv.pushItem(rDir, i, 1, k)
  19.             break
  20.         end
  21.     end
  22. end
Advertisement
Add Comment
Please, Sign In to add comment