+
+ --index
+ if get_item_group(node,"redstone_dust") > 0 then
+ if vector_distance(i,origin) < 8 then
+ --add data to both maps
+ if not r_index[i.x] then r_index[i.x] = {} end
+ if not r_index[i.x][i.y] then r_index[i.x][i.y] = {} end
+ r_index[i.x][i.y][i.z] = {dust = true,level = 0}
+ --the data to the 3d array must be written to memory before this is executed
+ --or a stack overflow occurs
+ localredstone.collector(i,origin)
+ return
+ else
+ if not r_index[i.x] then r_index[i.x] = {} end
+ if not r_index[i.x][i.y] then r_index[i.x][i.y] = {} end
+ r_index[i.x][i.y][i.z] = {torch = true,power=get_item_group(node,"redstone_power")}
+ return
+ end
+ end