Big terrain-gen overhaul. Todo: check for the bounding boxes