Advertisement
Frekvens1

[OC] [lib] Retreive all note blocks

Feb 24th, 2015
237
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.55 KB | None | 0 0
  1. -- Script created by Frekvens1 --
  2. -- Script used by OpenComputers mod in Minecraft --
  3.  
  4. -- This script is a lib, probably going to be used in my own OS --
  5.  
  6. -- local noteBlocks = require("getNoteBlocks") --
  7. -- noteBlocks[1].trigger(1) --
  8.  
  9. -- pastebin get qap1wCEk getNoteBlocks.lua --
  10.  
  11. local noteBlock = {}
  12.  
  13. do
  14.  
  15. local component = require("component")
  16. local Count = 1
  17.  
  18. for address in component.list("note_block") do
  19.      local inb = component.proxy(address)
  20.      noteBlock[tonumber(Count)] = inb
  21.      
  22.      Count = Count + 1
  23. end
  24.  
  25. end
  26.  
  27. return noteBlock
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement