Taruu

seeinv

Jun 18th, 2020
465
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.00 KB | None | 0 0
  1. local inv = component.proxy(component.list("transposer")())
  2. local com = component.proxy(component.list("computer")())
  3. local red = component.proxy(component.list("redstone")())
  4. local sides = 0
  5. local side = 0
  6. com.beep(1000,1)
  7. for sides=0,5 do
  8. if inv.getInventoryName(sides) == "minecraft:chest" then
  9.     side = sides
  10.     break
  11. end
  12. end
  13. com.beep(2000,1)
  14. while true do
  15. countSlotsTake = 0
  16. for i=1,inv.getInventorySize(side) do
  17. if inv.getSlotStackSize(side,i) > 0 then
  18.     countSlotsTake = countSlotsTake + 1
  19. end
  20. end
  21. if countSlotsTake == inv.getInventorySize(side) then
  22.     com.beep(500,1)
  23.     red.setOutput(2,15)
  24. else
  25.     red.setOutput(2,0)
  26.     com.beep(20,1)
  27. end
  28. end
Add Comment
Please, Sign In to add comment