Advertisement
3F0xog

startup.lua

Jul 1st, 2022 (edited)
543
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  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
RAW Paste Data Copied
Advertisement