Algorithm for avoiding clipping rooms in world generation