Advertisement
3F0xog

startup.lua

Jul 1st, 2022 (edited)
611
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.76 KB | None | 0 0
  1. local inputNeeded = "minecraft:sand"
  2. local inputAmount = 1
  3. local outputAmount = 1
  4. --------------------------------------------------------------------
  5. os.loadAPI("bpFuncs.lua")
  6.  
  7. local suckItems = false
  8. local inputDropper = peripheral.wrap("front")
  9. local outputDropper = peripheral.wrap("right")
  10. while true do
  11.     for slot, item in pairs(inputDropper.list()) do
  12.         if (item.name == inputNeeded) and (bpFuncs.GetOutputItems(outputDropper) >= outputAmount)  then
  13.             if item.count >= inputAmount then
  14.                 for i = 0, outputAmount, 1 do
  15.                     bpFuncs.SpitItem("right")
  16.                     os.shutdown()
  17.                 end
  18.             end
  19.         else
  20.             bpFuncs.SpitItem("front")
  21.         end
  22.     end
  23.     sleep(0)
  24. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement