def get_neighbors(chunk_key, only_chunk_keys=[], avoid_chunk_keys=[]):
	_neighbors = []
	_pos = [int(i) for i in chunk_key.split(',')]
	
	for pos in [(-1, 0), (1, 0), (0, -1), (0, 1)]:
		_chunk_key = '%s,%s' % (_pos[0]+(pos[0]*WORLD_INFO['chunk_size']), _pos[1]+(pos[1]*WORLD_INFO['chunk_size']))
		
		if only_chunk_keys and not _chunk_key in only_chunk_keys:
			continue
		
		if _chunk_key in avoid_chunk_keys:
			continue
		
		_neighbors.append(_chunk_key)
	
	return _neighbors
dataset/ETHPy150Open flags/Reactor-3/buildinggen.py/get_neighbors/original